this.addMouseListener(newMouseAdapter() { // 这个方法是鼠标监听,当我们点击一下,画圆饿了 publicvoidmouseClicked(MouseEvent m) { if(m.getClickCount() >=2) { // 获取这个圈的坐标 x = m.getPoint().x; y = m.getPoint().y; repaint();// 没有这个方法,就画不出来 好了,双击时出现一个...
My last jQuery post looked at how toget the mouse co-ordinates with jQueryas the mouse moves around the page or over a particular element. This post looks at how to get the mouse co-ordinates when an element is clicked. Example