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:
1 2 3 4 5 6 7
| 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]