Skip to main content

Using jdic TrayIcon in jre1.6 causes problems

5 replies [Last post]
susmitha
Offline
Joined: 2006-11-02

TrayIcon popup menu appears behind the task bar when auto task bar is set in windows XP and jre 1.6. This does not happen when using java.awt.TrayIcon.
But right now, we cannot migrate to java.awt.TrayIcon.

Is there any way that I can continue to use jdic TrayIcon and make the pop up appear on top of task bar even while using jre 1.6

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
abraxis
Offline
Joined: 2009-02-09

Don't you got it somewhere compiled? I would really appreciate it :-)

jsabin
Offline
Joined: 2006-08-12

This can be fixed for Windows by modifying org.jdesktop.jdic.tray.internal.impl.WinTrayIconService.setPopupMenu(). In the popupMenuWillBecomeVisible() method add "popupParentFrame.setAlwaysOnTop(true);".

midnightjava
Offline
Joined: 2007-07-04

Thanks for letting us know. Do you know if it will be incorporated into a JDIC release sometime? It's easy enough to fix, but it's nice to be able to use the binary distro instead of doing our own build.

stringbean
Offline
Joined: 2005-02-07

I'm not too sure about how you would fix JDIC TrayIcon for Java 6 but I would recommend that you check the Java version on start up and use the Java 6 tray integration when it is available.

I recently had to do this for Java 6 on the Mac (which runs in 64bit mode and won't load the JDIC libraries). It's a bit more work but the upshot is that the Java 6 tray menus tend to be closer to the native menus.

midnightjava
Offline
Joined: 2007-07-04

I encountered the same problem, and wrote some code that may be helpful. See http://forums.java.net/jive/thread.jspa?messageID=331104&#331104