-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
6
-
generic
-
generic
Setting a shortcut to an inserted MenuItem throws NullPointerException:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at sun.awt.X11.XMenuPeer.repaintMenuItem(XMenuPeer.java:360)
at sun.awt.X11.XMenuItemPeer.setLabel(XMenuItemPeer.java:60)
at java.awt.MenuItem.setShortcut(MenuItem.java:309)
This happens only with XToolkit. Works fine with Motif toolkit and in Windows. This is reproducible from tiger beta3 onwards. This happens only when Menu is not dropped down even once before insertion.
Steps to reproduce:
1. Run the attached testcase
2. When the Test Frame comes up, click the button 'Insert a MenuItem' on the Frame. Check the terminal window for the exception.
The exception does not occur if the menu button Menu0 is clicked before inserting the MenuItem.
###@###.### 2004-12-28 09:06:52 GMT
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at sun.awt.X11.XMenuPeer.repaintMenuItem(XMenuPeer.java:360)
at sun.awt.X11.XMenuItemPeer.setLabel(XMenuItemPeer.java:60)
at java.awt.MenuItem.setShortcut(MenuItem.java:309)
This happens only with XToolkit. Works fine with Motif toolkit and in Windows. This is reproducible from tiger beta3 onwards. This happens only when Menu is not dropped down even once before insertion.
Steps to reproduce:
1. Run the attached testcase
2. When the Test Frame comes up, click the button 'Insert a MenuItem' on the Frame. Check the terminal window for the exception.
The exception does not occur if the menu button Menu0 is clicked before inserting the MenuItem.
###@###.### 2004-12-28 09:06:52 GMT
- duplicates
-
JDK-5106833 NullPointerException in XMenuPeer.repaintMenuItem
-
- Closed
-