I developed my Java application in Swing. The application has been running fine until the time I added Sea Glass Look and Feel. When I disable Sea Glass L&F may the application will run fine. Sometimes it runs fine with Sea Glass L&F and sometimes it throws an exception. I understand that the Sea Glass L&F is causing this exception. I could post the SSCCE/MCVE but the application has many classes; However, the exception below shows what went wrong with the application. The situation is similar to this one here.
Qns How do we solve this Class cast exception?
Below is the exception:
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: com.seaglasslookandfeel.component.SeaGlassTitlePane cannot be cast to javax.swing.JScrollBar
at com.seaglasslookandfeel.state.ScrollBarButtonIsIncreaseButtonState.isInState(ScrollBarButtonIsIncreaseButtonState.java:44)
at com.seaglasslookandfeel.state.State.isInState(State.java:160)
at com.seaglasslookandfeel.SeaGlassStyle.getExtendedState(SeaGlassStyle.java:1288)
at com.seaglasslookandfeel.SeaGlassStyle.get(SeaGlassStyle.java:997)
at javax.swing.plaf.synth.SynthStyle.getIcon(Unknown Source)
at javax.swing.plaf.synth.SynthMenuUI.paint(Unknown Source)
at javax.swing.plaf.synth.SynthMenuUI.update(Unknown Source)
at javax.swing.JComponent.paintComponent(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.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$4.run(Unknown Source)