JDK-8112905 : PopupControls (ContextMenu, Tooltip) not shown in front of JFXPanel.
  • Type: Bug
  • Component: javafx
  • Sub-Component: swing
  • Affected Version: fx2.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2011-06-12
  • Updated: 2015-06-16
  • Resolved: 2011-06-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
fx2.0Fixed
Related Reports
Relates :  
Relates :  
Description
JFXPanel in JFrame: 

- A ContextMenu isn't positioned correctly and isn't shown in front of the JFrame.
- A Tooltip is positioned correctly but isn't shown in front of the JFrame.

See source code and screenshot.
Comments
Z-order problem is specific to Windows (and I suspect to Vista/7 only). On this platform, a window can be shown above all other windows from the same process only if it is focusable, which is not true for JavaFX popups. Even if I call toFront() explicitly, the popup still stays below the main stage. I played with toFront() implementations in the native (call BringWindowToTop(), SetForegroundWindow(), apply various window styles), but the only workaround found is to temporary make the popup always-on-top with SetWindowPos(... HWND_TOPMOST) and then reset this flag back to HWND_TOP.
17-06-2011

JFXPanel location is fixed as a part of the fix for RT-14135/RT-14292.
17-06-2011

I will send this comment on to Paru who owns the context menu functionality in controls.
16-06-2011

I have inspected the test code more carefully and found another problem: the popup is shown using mouse event's local x/y, but screen x/y should be used instead: contextMenu.show(vbox, e.getScreenX(), e.getScreenY()); The problem with JFXPanel's window location (0, 0) is still there and must be fixed.
16-06-2011

Wrong popup position is caused by JFXPanel reporting it's location as (0, 0), not the actual on-screen coordinates. Z-order is a separate problem, it needs more investigation.
16-06-2011

Reassigning to Artem for initial review.
13-06-2011