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

SynthArrowButton.getPreferredSize() fails with ClassCastException

XMLWordPrintable

    • b57
    • x86
    • windows_xp

      FULL PRODUCT VERSION :
      jdk1.6.0_12

      ADDITIONAL OS VERSION INFORMATION :
      WinXP 64bit

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      nothing special

      A DESCRIPTION OF THE PROBLEM :
      Getting a ClassCastException on SynthArrowButton.getPreferredSize:

      Exception in thread "AWT-EventQueue-1" java.lang.ClassCastException: javax.swing.plaf.synth.SynthSplitPaneDivider cannot be cast to javax.swing.JComponent
      at javax.swing.plaf.synth.SynthArrowButton$SynthArrowButtonUI.getPreferredSize(SynthArrowButton.java:103)


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Hava a splitbane with arrowbuttons (synth look and feel), call getPreferredSize on arrowbutton

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      i expect the preferredSize
      ACTUAL -
      I saw a ClassCastException

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Exception in thread "AWT-EventQueue-1" java.lang.ClassCastException: javax.swing.plaf.synth.SynthSplitPaneDivider cannot be cast to javax.swing.JComponent
      at javax.swing.plaf.synth.SynthArrowButton$SynthArrowButtonUI.getPreferredSize(SynthArrowButton.java:103)

      REPRODUCIBILITY :
      This bug can be reproduced always.

            peterz Peter Zhelezniakov
            igor Igor Nekrestyanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: