Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JPopup and System Tray icon

843806Jan 31 2009 — edited Feb 1 2009
Hi there,
I have a problem with my appl. May ý ask you?
I made a jpopup for using both menu in window and in system tray icon.
I used
 
trayIcon.addMouseListener(new MouseAdapter() {
        public void mouseReleased(MouseEvent e) {
            if (e.isPopupTrigger()) {

                jpopup.setLocation(e.getX(), e.getY());
                jpopup.setInvoker(jpopup);
                jpopup.setVisible(true);

            }
        }
        });
showing jpopup on trayicon.
But it is not closing itself. To close it, i have to push any menuitem on it.
Normally popup must close itself if we click mouse on anywhere of screen. But mine is not closing? How can fix this?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 1 2009
Added on Jan 31 2009
4 comments
176 views