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

ClassCastException thrown while running SwingSet2 demo

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P1 P1
    • 6
    • 6
    • client-libs
    • b87
    • x86
    • windows

      On Win32 XP machine.

      Install June 5th 2006 master nightly build, running swingset2 demo:

      java -jar SwingSet2.jar

      Under "Look & Feel" menu, switch to windows look and feel, you will get exception:

      (mustang b86 promoted build is okay)

      Failed loading L&F: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
      java.lang.ClassCastException: javax.swing.KeyStroke cannot be cast to java.lang.
      Comparable
      Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: javax.swing
      .plaf.ColorUIResource cannot be cast to java.util.List
              at javax.swing.plaf.metal.MetalUtils.drawGradient(Unknown Source)
              at javax.swing.plaf.metal.MetalInternalFrameTitlePane.paintComponent(Unk
      nown Source)
              at javax.swing.JComponent.paint(Unknown Source)
              at javax.swing.JComponent.paintChildren(Unknown Source)
              at javax.swing.JComponent.paint(Unknown Source)
              at javax.swing.JComponent.paintChildren(Unknown Source)
              at javax.swing.JComponent.paint(Unknown Source)
              at javax.swing.JLayeredPane.paint(Unknown Source)
              at javax.swing.JComponent.paintChildren(Unknown Source)
              at javax.swing.JComponent.paint(Unknown Source)
              at javax.swing.JComponent.paintChildren(Unknown Source)
              at javax.swing.JComponent.paint(Unknown Source)
              at javax.swing.JComponent.paintChildren(Unknown Source)
              at javax.swing.JComponent.paint(Unknown Source)
              at javax.swing.JComponent.paintChildren(Unknown Source)
              at javax.swing.JComponent.paint(Unknown Source)
              at javax.swing.JComponent.paintChildren(Unknown Source)
              at javax.swing.JComponent.paint(Unknown Source)
              at javax.swing.JComponent.paintChildren(Unknown Source)
              at javax.swing.JComponent.paint(Unknown Source)
              at javax.swing.JLayeredPane.paint(Unknown Source)
              at javax.swing.JComponent.paintChildren(Unknown Source)
              at javax.swing.JComponent.paint(Unknown Source)
              at javax.swing.JComponent.paintToOffscreen(Unknown Source)
              at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
              at javax.swing.RepaintManager.paint(Unknown Source)
              at javax.swing.JComponent._paintImmediately(Unknown Source)
              at javax.swing.JComponent.paintImmediately(Unknown Source)
              at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
              at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
              at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
              at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknow
      n Source)
              at java.awt.event.InvocationEvent.dispatch(Unknown Source)
              at java.awt.EventQueue.dispatchEvent(Unknown Source)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
              at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
              at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
              at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
              at java.awt.EventDispatchThread.run(Unknown Source)
      Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: javax.swing
      .KeyStroke cannot be cast to java.lang.Comparable
              at java.util.TreeMap.compare(Unknown Source)
              at java.util.TreeMap.put(Unknown Source)
              at java.util.TreeSet.add(Unknown Source)
              at com.sun.java.swing.plaf.windows.WindowsTabbedPaneUI.installDefaults(U
      nknown Source)
              at javax.swing.plaf.basic.BasicTabbedPaneUI.installUI(Unknown Source)
              at javax.swing.JComponent.setUI(Unknown Source)
              at javax.swing.JTabbedPane.setUI(Unknown Source)
              at javax.swing.JTabbedPane.updateUI(Unknown Source)
              at javax.swing.SwingUtilities.updateComponentTreeUI0(Unknown Source)
              at javax.swing.SwingUtilities.updateComponentTreeUI0(Unknown Source)
              at javax.swing.SwingUtilities.updateComponentTreeUI(Unknown Source)
              at SwingSet2$6.run(SwingSet2.java:973)
              at java.awt.event.InvocationEvent.dispatch(Unknown Source)
              at java.awt.EventQueue.dispatchEvent(Unknown Source)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
              at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
              at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
              at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
              at java.awt.EventDispatchThread.run(Unknown Source)


      You cannot start java control panel also, because of the same problem:

      Exception in thread "main" java.lang.ClassCastException: javax.swing.KeyStroke c
      annot be cast to java.lang.Comparable
              at java.util.TreeMap.compare(Unknown Source)
              at java.util.TreeMap.put(Unknown Source)
              at java.util.TreeSet.add(Unknown Source)
              at com.sun.java.swing.plaf.windows.WindowsTabbedPaneUI.installDefaults(U
      nknown Source)
              at javax.swing.plaf.basic.BasicTabbedPaneUI.installUI(Unknown Source)
              at javax.swing.JComponent.setUI(Unknown Source)
              at javax.swing.JTabbedPane.setUI(Unknown Source)
              at javax.swing.JTabbedPane.updateUI(Unknown Source)
              at javax.swing.JTabbedPane.<init>(Unknown Source)
              at javax.swing.JTabbedPane.<init>(Unknown Source)
              at com.sun.deploy.panel.ControlPanel.initComponents(Unknown Source)
              at com.sun.deploy.panel.ControlPanel.<init>(Unknown Source)
              at com.sun.deploy.panel.ControlPanel.main(Unknown Source)

            bchristi Brent Christian
            ngthomas Thomas Ng (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: