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
Sometimes when opening a submenu immediately after first opening the application we are getting an exception within SubMenuUsabilityHelper:
java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
at java.desktop/java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:2113)
at java.desktop/java.awt.Component.getLocationOnScreen(Component.java:2087)
at com.formdev.flatlaf.SubMenuUsabilityHelper.menuSelectionChanged(SubMenuUsabilityHelper.java:157)
at com.formdev.flatlaf.SubMenuUsabilityHelper.lambda$stateChanged$0(SubMenuUsabilityHelper.java:119)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:771)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:741)
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)
When this happens, invoker.isShowing() is false. This may be happening because we have a dynamic popup menu that populates itself. The first call in the update is to JMenu.removeAll() which may cause it to be hidden.
Sometimes when opening a submenu immediately after first opening the application we are getting an exception within
SubMenuUsabilityHelper
:When this happens,
invoker.isShowing()
is false. This may be happening because we have a dynamic popup menu that populates itself. The first call in the update is toJMenu.removeAll()
which may cause it to be hidden.In any case, adding a check for
invoker.isShowing()
in the conditional when getting the invoker screen bounds could avoid this issue.The text was updated successfully, but these errors were encountered: