This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
I am trying to use a JTable with the default table model. I am passing in a vector of vectors and a vector of Strings (for the labels). I can't get the labels to show up put I do see a little tiny box where the column headings should go (I assume). I am adding table to a scrollPane and then to a panel. I can see the data values but can't get the column names to appear Vector vColumnNames = new Vector(); vColumnNames.add("Style"); Vector vData = new Vector(); Vector vStuff= new Vector(); vStuff.add("vector"); vData.add(vStuff); System.out.println("the vector value " + vColumnNames.firstElement().toString()); DefaultTableModel x = new DefaultTableModel(vData,vColumnNames); JTable tblMap = new JTable(x);