SOS on ClassCastExeption

O

:-o

Thanks,

I think this error is an icon drawing problem but not sure why. Errors report
java/microsoft problem.

I've written a gui which has a JLabel specifying an icon. Sometimes I get this:

java.lang.ClassCastException
at java.awt.image.ColorModel.getAlpha(ColorModel.java:814)
at java.awt.image.ColorModel.getRGB(ColorModel.java:859)
at sun.awt.image.ImageRepresentation.convertToRGB(ImageRepresentation.java:271)
at sun.awt.image.ImageRepresentation.setPiexels(ImageRepresentation.java:485)
at
java.awt.image.AreaAveragingScaleFilter.accumPixels(AreaAveragingScaleFilter.jav
a:196)
at
java.awt.image.AreaAveragingScaleFilter.setPiexels(AreaAveragingScaleFilter.java
:235)
at sun.awt.image.PixelStore8.replayLines(PixelStore8.java:38)
at sun.awt.image.PixelStore.replay(PixelStore.java:217)
at sun.awt.image.PixelStore.replay(PixelStore.java:146)
at
sun.awt.image.InputStreamImageSource.updateFromStore(InputStreamImageSource.java
:244)
at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:168)
at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)

Anyone got any clues? When this happens, my gui is starved or repaints. If I
trap ClassCastException in main
will this stop starvation of my gui (repaints being denied)?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top