File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes JTable ClassCastException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable ClassCastException" Watch "JTable ClassCastException" New topic
Author

JTable ClassCastException

Denise Advincula
Ranch Hand

Joined: Jan 01, 2007
Posts: 160
I am having problems on this code,



JTable has constructor like this based on the API: JTable(Vector data, Vector header), how come I'm encountering errors on this specific line:

JTable productTable = new JTable(productData, header);

It compiles fine but when I run it, the error is this:




Is there anything that I missed?
[ August 06, 2008: Message edited by: Denise Saulon ]

SCJP/OCPJP 6 | SCWCD/OCPJWCD 5 | OCMJEA in progress...
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
data is a vector of vectors

Denise Advincula
Ranch Hand

Joined: Jan 01, 2007
Posts: 160
Didn't realize that the problem is just the logic.

Thank you very much for pointing that out.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTable ClassCastException
 
Similar Threads
JTable
JTable
JTable
how to "clear" jTable
Jtable