This content has been marked as final. Show 6 replies
Read the section from the Swing tutorial on [url http://download.oracle.com/javase/tutorial/uiswing/misc/systemtray.html]How to Use the System Tray. Swing components are not supported so you can't use images. There is a bug id in the tutorial with more information.
Thank you for your answer,
I am not using JMenuItem. in my application i had used awt MenuItem. (ie, used MenuItem aboutItem = new MenuItem("About"); not JMenuItem aboutItem = new JMenuItem("About"); ) We can add trat icon to system tray. when mouse right click the menu and menu items will show. I need to add some icons in the pop up menu items. Can i do this?
Edited by: user13423634 on Dec 29, 2010 10:34 PM
I am not using JMenuItemI know. My reply stated you can't use Swing components.
I need to add some icons in the pop up menu items. Can i do this?Swing menu items support icons, but AWT menu items don't. Since you can't use Swing components then you can't use icons.
Moderator action: Moved from Java Programming.
camickr wrote:I wonder why system tray context menu does not support Swing JMenuItem? A menu with icons would be really nice for users. Is there any trick around to get rid of this limitation?
Swing components are not supported so you can't use images.
Moderator advice: Please don't post to old long dead threads and don't hijack another poster's thread. When you have a question, start your own thread.
Moderator action: Locking this thread.