The easiest way is to right-click on a newly created JTable in the
Matisse (=Netbeans Swing GUI editor) -> "Table contents..." -> Columns
-> <add and remove columns as you like> and then switch to code view
and expand the folded generated code.
HTH.
--
Martin Wildam
I start getting into doubt if I got it right, what you are trying to achieve.
Adding a row to a table with default table model is quite simple -
just to give an example:
public static void addTableRow(DefaultTableModel model, String... columns)
{
model.addRow(columns);
}
Not sure why you are using the Vector.
For setting a particular value by giving it's row and column use
model.setValueAt.
Just an important thing (if you don't already know): Don't mix up row
index in table with row and column index in model - it is not the same
for both if the table gets sorted or columns get moved.
--
Martin Wildam
--
You received this message because you are subscribed to the Google Groups "The Java Posse" group.
To post to this group, send email to java...@googlegroups.com.
To unsubscribe from this group, send email to javaposse+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
Indeed - undergone same "conversion", although it took me maybe 30 mins. ;-)
--
Martin Wildam