Exemplo n.º 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();
 }
Exemplo n.º 2
0
 /** Invoked when a mouse button has been released on a component. */
 public void mouseReleased(MouseEvent e) {
   if (timer != null) {
     timer.stop();
   }
 }