Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collapsed Menus Can't Be Expanded #8366

Open
IanKrL opened this issue Mar 27, 2025 · 2 comments
Open

Collapsed Menus Can't Be Expanded #8366

IanKrL opened this issue Mar 27, 2025 · 2 comments
Labels
kind:bug Bug report or fix Look and Feel UI User Interface

Comments

@IanKrL
Copy link

IanKrL commented Mar 27, 2025

Apache NetBeans version

Apache NetBeans 25

What happened

When trying to view hidden toolbar items, nothing happens.

A stack trace is written to the log:

SEVERE [global]
java.lang.NullPointerException: Cannot invoke "java.awt.Component.getGraphicsConfiguration()" because "owner" is null
	at com.formdev.flatlaf.ui.FlatPopupFactory.getPopup(FlatPopupFactory.java:141)
	at java.desktop/javax.swing.plaf.PopupMenuUI.getPopup(PopupMenuUI.java:71)
	at com.formdev.flatlaf.ui.FlatPopupMenuUI.getPopup(FlatPopupMenuUI.java:216)
	at java.desktop/javax.swing.JPopupMenu.showPopup(JPopupMenu.java:872)
	at java.desktop/javax.swing.JPopupMenu.setVisible(JPopupMenu.java:820)
	at org.openide.awt.ToolbarWithOverflow.displayOverflow(ToolbarWithOverflow.java:317)
	at org.openide.awt.ToolbarWithOverflow.access$400(ToolbarWithOverflow.java:52)
	at org.openide.awt.ToolbarWithOverflow$3.mouseEntered(ToolbarWithOverflow.java:303)
	at java.desktop/java.awt.AWTEventMulticaster.mouseEntered(AWTEventMulticaster.java:308)
	at java.desktop/java.awt.AWTEventMulticaster.mouseEntered(AWTEventMulticaster.java:307)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6630)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3398)
	at java.desktop/java.awt.Component.processEvent(Component.java:6386)
	at java.desktop/java.awt.Container.processEvent(Container.java:2266)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4996)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4828)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEnterExit(Container.java:4726)
	at java.desktop/java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:4704)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4555)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4828)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:98)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:747)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:744)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
[catch] at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Language / Project Type / NetBeans Component

I'm using Java with Gradle (I also tested with a Maven Java project) but I think any project will be the same.

How to reproduce

Create a new Project (Any project will do)
Shrink the window horizontally until several toolbar icons are hidden and a dropdown button is displayed.
Click the dropdown button to see the hidden icons

Expected: Hidden Icons are Displayed
Actual: Nothing

Did this work correctly in an earlier version?

No / Don't know

Operating System

Windows (Appears to be Windows only, but no time to confirm for sure at the moment)

JDK

21.0.5

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

This appears to be a FlatLaf-related bug
Pretty sure this was first broken in NB 23 but I don't have time to verify that at the moment.

Are you willing to submit a pull request?

No

@IanKrL IanKrL added kind:bug Bug report or fix needs:triage Requires attention from one of the committers labels Mar 27, 2025
@DevCharly
Copy link
Member

Will be fixed in FlatLaf 3.6 (coming in ~1 week): JFormDesigner/FlatLaf#952

@IanKrL
Copy link
Author

IanKrL commented Mar 28, 2025

Excellent. For some reason I hadn't checked the FlatLaf tickets yet. Thanks for linking it up.

@mbien mbien added Look and Feel UI User Interface and removed needs:triage Requires attention from one of the committers labels Mar 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Bug report or fix Look and Feel UI User Interface
Projects
None yet
Development

No branches or pull requests

3 participants