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.
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.