示例#1
0
 /** Invoked when a mouse button has been pressed on a component. */
 public void mousePressed(MouseEvent e) {
   timer = new Timer(DELAY, new TimeListener(e));
   timer.start();
 }
示例#2
0
 /** Invoked when a mouse button has been released on a component. */
 public void mouseReleased(MouseEvent e) {
   if (timer != null) {
     timer.stop();
   }
 }