File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes System Tray with Java 6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "System Tray with Java 6" Watch "System Tray with Java 6" New topic

System Tray with Java 6

Paul Heitkemper

Joined: Mar 01, 2007
Posts: 1
I'm trying to add JRadioButtonMenuItems to the popup Menu for my sample System Tray app. The only problem is that it wants a PopupMenu class, not a JPopupMenu class, so I can't add the radio button items. To confuse matters further, the Sun example at
shows sample picture WITH JRadioButtonMenuItems

Is there a way to make this work, or will I have to ignore the PopupMenu param of the TrayIcon object and manage my own JPopupMenu?
Terry Ong
Ranch Hand

Joined: Apr 07, 2006
Posts: 50
Credits to 'Source' for the article 'Using JPopupMenu in TrayIcon'

I haven't really tried it but seems like its possible.
Basically, the idea is to invoke the jpopup menu manually during a popuptrigger mouse event. Seems a bit hackish.

Hope this helps.
I agree. Here's the link:
subject: System Tray with Java 6
jQuery in Action, 3rd edition