• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTable ClassCastException

 
Denise Advincula
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
data is a vector of vectors

 
Denise Advincula
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Didn't realize that the problem is just the logic.

Thank you very much for pointing that out.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic