Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Populating A JTable with data from vectors

ernest fakudze
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,
I'm new to JTable. I looked at the possible constructors and I decided to go for the one that takes two vectors mainly because of my situation e.g.
table = new JTable(Vector rowsData, Vector columnNames).
Now, I think that the column vectors contains the strings for the column headers. Is this true? If so, then how do I loop through that vector and show the headers?
In my rowsData Vector I have an Object which takes the args (String s, String s, String s). Of course I will have to disect this object to get the fields.
So how do I do this. Please help me. Btw I read the Sun tutorial on JTables and I'm still but I'm still clueless.
[ April 03, 2002: Message edited by: ernest fakudze ]
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic