Alex Rivera | Logout

java - catch event of double click on icon in tray

Asked 2011-06-09T07:39:42.357
9

I want to make my form visible when I double click the tray icon?
How do I catch the double click on the icon?
Thanks.

Edit
Report

1 Answer

4

Use MouseListener interface

public class MouseEventDemo ... implements MouseListener

and implement

public void mouseClicked(MouseEvent e) { }

You can find out the click value from int getClickCount() it returns the number of quick, consecutive clicks the user has made (including this event). For example, returns 2 for a double click.

answered 2011-06-09T07:45:42.857

Your Answer