java netbeans jtable defaulttablemodel - how to connect them



Hay!

I am beginner in NetBeans. I have an aplication with JFrame. On it I
have JTable and other things. I want to connect JTable with Vector. I
tried with

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). I wanted to add data with
method data.addRow(vec);. It works if I write code in TextPad and
compile it, but I don't want to write such a long code in text editor.

Have any suggestion?

Thanks in advance, Simon

.



Relevant Pages

  • Re: Confused about referencing info stored in a JFrame
    ... worried no one would see it with all the cigarette kid spam I saw on ... Netbeans said that getModelreturns the rendering model ... but the dbInfo class is actually declared inside the JFrame and ... intialised in its constructor, so the method of calling the dbInfo's ...
    (comp.lang.java.gui)
  • Re: Andockbare Fenster
    ... Ich versuche es gerade mit einer Klasse, die ich von JPanel ableite: ... pubic JFrame getFrame{ ... JFrame f = new JFrame); ... Oder noch besser du benutzt gleich Netbeans als RCP, dann brauchst du dich darum nicht kümmern. ...
    (de.comp.lang.java)
  • Re: "Unveiling" an image
    ... Thomas A. Russ wrote: ... I use netbeans 3.6 and i can add into a JFrame only 5 labels.Can you help me? ...
    (comp.lang.java.gui)