Dear all,
I get an error when trying to get a JPanel from a Vector:
JComponentsResults result; // (JComponentsResults extends Vector)
...
System.out.println("String Representation of the Vector:" + result.toString());//debugging
(JPanel) toto = (JPanel)result.get(iComponent);
The output is :
************
Exception in thread "AWT-EventQueue-0" String representation : [[javax.swing.JPanel[,0,0,0x0,layout=java.awt.GridBagLayout,alignmentX= 0.0,alignmentY=0.0,border=,flags=9,maximumSize=,mi nimumSize=,preferredSize=]]]
java.lang.ClassCastException: java.util.Vector cannot be cast to javax.swing.JPanel
at Session.displayResults(Session.java:158)
************
I Tried to cast to JComponent, it does not work either.
Is it possible to get JComponents from a Vector ?
Any idea will be appreciated.
Thanks.
Eric
~