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

ClassCastException from ComboBoxEditableState (Nimbus LaF) in JDK 1.6.0_10 RC

    Details

    • Subcomponent:
    • Resolved In Build:
      b60
    • CPU:
      x86
    • OS:
      windows_vista
    • Verification:
      Verified

      Backports

        Description

        This is exactly the same problem as described in CR 6717853 except that this is for the Nimbus LaF (whereas CR 6717853 is filed for GTK).

        When using NetBeans profiler 6.1/6.5 Beta running on JDK 1.6.0_10 RC with Nimbus LaF, profiling results cannot be displayed and HeapWalker tool doesn't work because of ClassCastException from ComboBoxEditableState. The same happens in VisualVM tool because it shares the NB profiler code.

        Technical details and sample code are available in CR 6717853.

        Steps to reproduce:
         1/ Use JDK 1.6.0_10 RC on Windows/Linux/Solaris
         2/ Download VisualVM tool (https://visualvm.dev.java.net), unzip and start it with Nimbus LaF: visualvm --ui "com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"
         3/ Right-click VisualVM application node in the Applications tree, invoke Heap Dump action
         4/ Heap dump opens in HeapWalker tool, switch to Classes view, exception is thrown:

        java.lang.ClassCastException: org.netbeans.lib.profiler.ui.components.FilterComponent cannot be cast to javax.swing.JComboBox
        at com.sun.java.swing.plaf.nimbus.ComboBoxEditableState.isInState(ComboBoxEditableState.java:21)
        at com.sun.java.swing.plaf.nimbus.State.isInState(State.java:109)
        at com.sun.java.swing.plaf.nimbus.NimbusStyle.getExtendedState(NimbusStyle.java:1003)
        at com.sun.java.swing.plaf.nimbus.NimbusStyle.getBorderPainter(NimbusStyle.java:886)
        at com.sun.java.swing.plaf.nimbus.SynthPainterImpl.paintBorder(SynthPainterImpl.java:102)
        at com.sun.java.swing.plaf.nimbus.SynthPainterImpl.paintComboBoxBorder(SynthPainterImpl.java:468)
        at javax.swing.plaf.synth.SynthComboBoxUI.paintBorder(SynthComboBoxUI.java:302)
        at javax.swing.plaf.synth.SynthBorder.paintBorder(SynthBorder.java:46)
        at javax.swing.border.CompoundBorder.paintBorder(CompoundBorder.java:94)
        at javax.swing.JComponent.paintBorder(JComponent.java:922)
        at javax.swing.JComponent.paint(JComponent.java:1028)
        [...]

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  peterz Peter Zhelezniakov (Inactive)
                  Reporter:
                  jisedlac Jirí Sedlácek
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: