Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClassCastException with Java 8 (later than 8.0_11) #110

Open
GoogleCodeExporter opened this issue Jul 12, 2015 · 4 comments
Open

ClassCastException with Java 8 (later than 8.0_11) #110

GoogleCodeExporter opened this issue Jul 12, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Use the seaglass demo package.
2. Run one of the demo, for instance TestButtons.java
3. Hover one of the buttons in the title bar (Minimize, Maximize, Close) and 
wait for the toolTip to appear.
4. The following Exception is thrown:
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: 
javax.swing.JButton cannot be cast to javax.swing.JToolTip
    at javax.swing.plaf.synth.SynthToolTipUI.paint(SynthToolTipUI.java:179)
    at javax.swing.plaf.synth.SynthToolTipUI.update(SynthToolTipUI.java:141)
    at javax.swing.JComponent.paintComponent(JComponent.java:777)
    at javax.swing.JComponent.paint(JComponent.java:1053)
    at javax.swing.JComponent.paintChildren(JComponent.java:886)
    at javax.swing.JComponent.paint(JComponent.java:1062)
    at javax.swing.JComponent.paintChildren(JComponent.java:886)
    at javax.swing.JComponent.paint(JComponent.java:1062)
    at javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
    at javax.swing.JComponent.paintChildren(JComponent.java:886)
    at javax.swing.JComponent.paint(JComponent.java:1062)
    at javax.swing.JComponent.paintToOffscreen(JComponent.java:5223)
    at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1572)
    at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1495)
    at javax.swing.RepaintManager.paint(RepaintManager.java:1265)
    at javax.swing.JComponent._paintImmediately(JComponent.java:5171)
    at javax.swing.JComponent.paintImmediately(JComponent.java:4982)
    at javax.swing.RepaintManager$4.run(RepaintManager.java:824)
    at javax.swing.RepaintManager$4.run(RepaintManager.java:807)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:807)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:782)
    at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:731)
    at javax.swing.RepaintManager.access$1300(RepaintManager.java:64)
    at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1720)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744)
    at java.awt.EventQueue.access$400(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:697)
    at java.awt.EventQueue$3.run(EventQueue.java:691)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:714)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)


What is the expected output? What do you see instead?
I should see the tooltip matching the button I'm hovering. Instead I get an 
Exception.
This problem is not limited to the title bar buttons. I get Exceptions all over 
the place in my application for JScrollBar being cast as JMenuItem, RootPane 
has JToolTip and many more. 

What version of the product are you using? On what operating system? What
JRE version?
Tested on Windows 7 using jdk8.0_20 and jdk8.0_25. No problem with jdk8.0_11

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 10 Nov 2014 at 6:33

@GoogleCodeExporter
Copy link
Author

Yes, it doesn't work as expected. I'm having the same issue. On jdk8.0_25. Also 
it't doesn't support the SWingX components. Please, fix it. 

Original comment by [email protected] on 15 Jan 2015 at 7:33

@GoogleCodeExporter
Copy link
Author

Same problem here... that look and feel looks great but I can't make it work 
without having one hundred exceptions thrown. What a pity!

Original comment by [email protected] on 18 Feb 2015 at 2:42

@GoogleCodeExporter
Copy link
Author

Yeah this happens to me too 

Original comment by [email protected] on 19 Feb 2015 at 7:10

@etsinko
Copy link

etsinko commented Jul 4, 2016

Yep, same problem for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants