Comments

Are you talking of how to add records data to the table ?I am asking this because when you add a record into atable with columns a row is automaticallt generated toadd the recods.

Or did I misunderstood ?

bashiro

: : Is there any way to add a row to a JTable at Runtime? I see that there is an addColumn and a columnAdded method, but nothing for Rows.: : Anybody got any ideas? I basically just need a multi field list to hold a list of variables and there values.: : TIA: Jake:

...and I want to add another person to the list. I suppose you could equate it to adding another record to a database. With JList or JComboBox you can use .addItem or something, but I can't find anything equivalent for a JTable.

: Are you talking of how to add records data to the table ?: I am asking this because when you add a record into a: table with columns a row is automaticallt generated to: add the recods.: : Or did I misunderstood ?: : bashiro: : : : : : Is there any way to add a row to a JTable at Runtime? I see that there is an addColumn and a columnAdded method, but nothing for Rows.: : : : Anybody got any ideas? I basically just need a multi field list to hold a list of variables and there values.: : : : TIA: : Jake: : : :

[b]What you can do is to create an instance of a Vector, HashTable orHashMap and then get user inputs and store it in one of the above.Later you populate JTable with the values.You can also get the user input and add it to the array. In this caseyou have to create (example a text file) and write to it for storage.Example ;[code]Vector table = new Vector();or HashMap hm = new HashMap();

[/code]

The best way is to use a pure database sofware like Oracle, Ms Sql, Mysql (this is free), ms Access and many more. In this case you edit your tabel and let the DAtabase program take care of the storage (of course you have to use sql commands).

: : What I mean is that if you've got a table, like the one below ...: : http://java.sun.com/docs/books/tutorial/uiswing/components/example-swing/SimpleTableDemo.java: : ...and I want to add another person to the list. I suppose you could equate it to adding another record to a database. With JList or JComboBox you can use .addItem or something, but I can't find anything equivalent for a JTable.: : : : : Are you talking of how to add records data to the table ?: : I am asking this because when you add a record into a: : table with columns a row is automaticallt generated to: : add the recods.: : : : Or did I misunderstood ?: : : : bashiro: : : : : : : : : : Is there any way to add a row to a JTable at Runtime? I see that there is an addColumn and a columnAdded method, but nothing for Rows.: : : : : : Anybody got any ideas? I basically just need a multi field list to hold a list of variables and there values.: : : : : : TIA: : : Jake: : : : : : : : :

I'm experiencing a similar problem and could really use some help. I've created a jTable in NetBeans 6.9.1, bound it to a MySQL table and a the elements to a list. When I update the list, however, the table is not updated.

I've verified that in the persistence.xml, an entity class is created and included for the table in question.

What am I doing wrong? Any thoughts or suggestions would be very much appreciated.