Hello all, I'm trying to create a Jtable and make it load the contents of a vector after i press a button. The problem is that the table wont display what it should, instead it remains empty. I know that my vector is loaded because i print out its contents in the command line.
Here is some code, i hope that helps. Thanks
Joined: Aug 07, 2003
From the JavaDocs for the JTable(Vector rowData, Vector columnNames) constructor:
Constructs a JTable to display the values in the Vector of Vectors, rowData, with column names, columnNames.
Does your data Vector (newVect) hold Vectors of Strings, or just Strings directly?
Joined: Mar 01, 2005
Hello again david always helpful hehe
The vector holds vectors of strings. i changed some things in the code and got it to work. I cant get it to work with a scrollpane tho. Here is my code:
The strange thing is that if i uncomment the scrollpane lines, the table remains empty, i cant get it to load the vector.