Re: java netbeans jtable defaulttablemodel - how to connect them



On 18 Oct 2005 11:55:12 -0700, cernesimon@xxxxxxxxx wrote or quoted :

>Vector vec = new Vector();
>DefaultTableModel data = new DefaultTableModel();
>JTable table = new JTable(data);
>
>but there is nothing in JTable on my JFrame (after I read file with
>data and wanted to insert it in JTable).

See if you can find a cheap Swing textbook that has some sample JTable
code or some sample code on the net that uses the classes you need.

What you do is create a new class that extends DefaultTableModel and
hence implements TableModel. In that code you write addRow etc. to
insert data into your Vector.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
.