Click to See Complete Forum and Search --> : mouse/keyboard events


daileyps
September 14th, 2000, 04:41 PM
Looking for sample on how to trap enter key or double click so I can perform other actions...thanks!

kannanbalu
September 14th, 2000, 06:39 PM
Handle MouseListener for mouse events and
ActionListener for key events.

for capturing double click,

void mouseClicked(MouseEvent e)
{
if (e.getClickCount() == 2)
{
//write your code here
}
}

Kannan

daileyps
September 15th, 2000, 01:23 PM
Thank you...is there a similar listener to trap the enter key?