UIWindow Class Cast Exception

Hi guys,

I’m trying to use a JList in a window, and getting a class cast exception. The list is initialized using the default constructor (via Class.newInstance()).

Here is the stack:

java.lang.ClassCastException
at com.xith3d.userinterface.UIWindow.getDirtyAreas(UIWindow.java)
at com.xith3d.userinterface.UIWindow.getDirtyAreas(UIWindow.java)
at com.xith3d.userinterface.UIWindow.renderToBuffer(UIWindow.java)
at com.xith3d.userinterface.UIWindow.update(UIWindow.java)
at com.xith3d.userinterface.UIWindowManager.newFrame(UIWindowManager.java)
at com.xith3d.scenegraph.View.getRenderFrame(View.java)
at com.xith3d.scenegraph.View.renderOnce(View.java)
at com.xith3d.scenegraph.View.renderOnce(View.java)
at com.riverside.ch.client.CHClient$1.run(CHClient.java:88)

I think the problem lies inside getDirtyRegions()here:


        if (c instanceof Container) {
            Container ca = (Container) c;
            Component cs[] = ca.getComponents();
            for (int i = 0; i < cs.length; i++) {
                getDirtyAreas(p, (JComponent)cs[i], areas);
            }
        }

What do you think? Can you try replicating this by adding a JList that has no model?

Have a good one,

Eric
[Mix]

I will check it out!

Submitted Issue.

https://xith3d.dev.java.net/issues/show_bug.cgi?id=29

I have a fix for this. I should do a commit in the next day or so.

Sweet. Thanks. Was it the converting between Components and JComponents?