JPopupMenu Partially hidden behind Windows Taskbar
843806Jan 7 2009 — edited Jan 7 2009I have a JPopupMenu that is made visible when the user clicks an icon in the notification area (aka system tray). On Wndows, the popup is partially hidden by the Task Bar, and I'd like it to be in front. But I can't see any methods in JPopupMenu or its super classes that accomplish this, such as Window.toFront(). However, even that method only ensures the Window is on top of other windows in the JVM, and whether or not it ends up on top of native windows or windows in other JVMs is platform-dependent. But my experience with using Window.toFront() on Windows OS has been positive.
Just to avoid a red herring, there is a problem with Windows, fixed by XP SP3, wherein tooltip menus for icons in the notification area are obscured by the task bar. See [this forum article|http://www.msfn.org/board/System-tray-obscures-pop-t116207.html&p=757509] for details. I'm running XP SP3, however, and popups from the notification area for non-Java apps are shown on top of the task bar.
Does anyone have a suggestion for how I can get the JPopupMenu to display in front of the task bar? I could use JPopupMenu.setLocation() to palce the popup just above the task bar, but that will be visually undesirable.
I'm using the SystemTray class from the JDIC library because my app needs to work with Java 5. Since the popup menu is a jdk class, I'm assuming the problem is not in JDIC, but I'll check that source vector as well.
Edited by: MidnightJava on Jan 7, 2009 5:44 PM