-
Bug
-
Resolution: Fixed
-
P2
-
1.4.2
-
b20
-
sparc
-
solaris_2.6
Line 411 of com.sun.java.swing.plaf.gtk.SynthMenuItemUI is:
SynthPopupMenuUI popupUI = (SynthPopupMenuUI)((JPopupMenu)parent).getUI();
It assumes that all popup menus will return an instance of SynthPopupMenuUI.
There is no contract in Swing that this should be true - any subclass can
return some other UI class from getUI, or have setUI called on it. Any
application which supplies its own UI classes for popup menus will fail
to work properly because of this.
See also
http://www.netbeans.org/issues/show_bug.cgi?id=32633
SynthPopupMenuUI popupUI = (SynthPopupMenuUI)((JPopupMenu)parent).getUI();
It assumes that all popup menus will return an instance of SynthPopupMenuUI.
There is no contract in Swing that this should be true - any subclass can
return some other UI class from getUI, or have setUI called on it. Any
application which supplies its own UI classes for popup menus will fail
to work properly because of this.
See also
http://www.netbeans.org/issues/show_bug.cgi?id=32633