Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4844816

GTK look and feel throws CCE for menu items supplying their own UI delegate

XMLWordPrintable

    • 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

            svioletsunw Scott Violet (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: