Hi everyone,
has anyone tried to use JMenuBar with a non-Apple L&F in Tiger?
If I try to do so (with both JRE 1.4.2 and 1.5), I get a NullPointerException as soon as I try to open a menu:
Now the question is why apple.laf.ScreenPopupFactory.getPopup() gets called when the laf isn't activated?
If I use Apples L&F, the problem vanishes.
Greetings
Marcus
has anyone tried to use JMenuBar with a non-Apple L&F in Tiger?
If I try to do so (with both JRE 1.4.2 and 1.5), I get a NullPointerException as soon as I try to open a menu:
Code:
apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NullPointerException
java.lang.NullPointerException
at apple.laf.ScreenPopupFactory.getPopup(ScreenPopupFactory.java:38)
at com.jgoodies.looks.common.ShadowPopupFactory.getPopup(ShadowPopupFactory.java:135)
at javax.swing.plaf.PopupMenuUI.getPopup(PopupMenuUI.java:44)
at javax.swing.JPopupMenu.getPopup(JPopupMenu.java:839)
at javax.swing.JPopupMenu.setVisible(JPopupMenu.java:789)
at javax.swing.JPopupMenu.show(JPopupMenu.java:956)
at javax.swing.JMenu.setPopupMenuVisible(JMenu.java:320)
at javax.swing.JPopupMenu.menuSelectionChanged(JPopupMenu.java:1468)
at javax.swing.MenuSelectionManager.setSelectedPath(MenuSelectionManager.java:89)
at javax.swing.plaf.basic.BasicMenuUI.appendPath(BasicMenuUI.java:217)
at javax.swing.plaf.basic.BasicMenuUI.access$200(BasicMenuUI.java:32)
at javax.swing.plaf.basic.BasicMenuUI$Handler.mousePressed(BasicMenuUI.java:457)
at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)
at java.awt.Component.processMouseEvent(Component.java:5559)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3093)
at java.awt.Component.processEvent(Component.java:5327)
at java.awt.Container.processEvent(Container.java:2010)
at java.awt.Component.dispatchEventImpl(Component.java:4029)
at java.awt.Container.dispatchEventImpl(Container.java:2068)
at java.awt.Component.dispatchEvent(Component.java:3877)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3933)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
at java.awt.Container.dispatchEventImpl(Container.java:2054)
at java.awt.Window.dispatchEventImpl(Window.java:1766)
at java.awt.Component.dispatchEvent(Component.java:3877)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:267)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:182)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Now the question is why apple.laf.ScreenPopupFactory.getPopup() gets called when the laf isn't activated?
If I use Apples L&F, the problem vanishes.
Greetings
Marcus