java - catch event of double click on icon in tray

后端 未结 6 1138

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.

6条回答
  •  甜味超标
    2020-12-07 02:15

    Try to use MouseListener with

         public void mousePressed( MouseEvent e ) {
            if(e.getClickCount() >= 2){
                //do something
            }
         }
    

提交回复
热议问题