You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Windows, in a JFrame with a JMenuBar and FlatLAF unified title/menu bar enabled, glass panes set via JRootPane.setGlassPane() end up having the wrong bounds. Specifically, the bounds appear shifted down by the height of a regular JMenuBar, even though the JMenuBar is rendered as part of the title bar and does not actually shift other components down.
This in turn causes SwingUtilities.convertPoint to yield the wrong coordinates when converting between the coordinate systems of the glass pane and other components in the window.
The bug was probably introduced by the change in #630 (commit 9101324 ), and can be worked around by setting putClientProperty("JRootPane.glassPaneFullHeight", true) on the JRootPane. (Great foresight putting risky changes behind client properties, by the way!👍)
In the NetBeans IDE (and NetBeans Platform applications such as Ultorg), the bug causes drag-and-drop indication lines that are implemented in org.openide.explorer.view.DropGlassPane to appear in the wrong Y position:
It is not a bug that glass pane is not at location 0,0 in root pane.
This is to avoid that the glass pane overlaps the FlatLaf window title bar and allowing the user to move/maximize/close a window even if a glass pane is active. On macOS/Linux, the glass pane also do not overlap the window title bar (which is not possible because it is provided by the operating system).
The real bug in NetBeans (and in your example above) is to convert coordinates to root pane and then use them for glass pane.
Better convert coordinates to glass pane when using them in glass pane 😉
On Windows, in a JFrame with a JMenuBar and FlatLAF unified title/menu bar enabled, glass panes set via JRootPane.setGlassPane() end up having the wrong bounds. Specifically, the bounds appear shifted down by the height of a regular JMenuBar, even though the JMenuBar is rendered as part of the title bar and does not actually shift other components down.
This in turn causes SwingUtilities.convertPoint to yield the wrong coordinates when converting between the coordinate systems of the glass pane and other components in the window.
The bug was probably introduced by the change in #630 (commit 9101324 ), and can be worked around by setting putClientProperty("JRootPane.glassPaneFullHeight", true) on the JRootPane. (Great foresight putting risky changes behind client properties, by the way!👍)
In the NetBeans IDE (and NetBeans Platform applications such as Ultorg), the bug causes drag-and-drop indication lines that are implemented in org.openide.explorer.view.DropGlassPane to appear in the wrong Y position:
Possibly similar bug: #658
Here is an example JFrame that shows the problem:
Screenshot with APPLY_BUG_WORKAROUND=false, showing the bug (red line should be at bottom edge of JLabel, but is not):
Screenshot with APPLY_BUG_WORKAROUND=true, showing the correct/expected output:
The text was updated successfully, but these errors were encountered: