/** 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(); }