hello!

i want to create jtable dynamically...

i have two class one is add records to Data Base another one is show
records list that were inserted...

how do pass each records in JTable without replacing existing on...

i need to grow the table every time the records success fully inserted...

Use the method of JTable: setModel(TableModel dataModel).
Create a DefaultTableModel object and pass that as parameter to the setModel method.

Whenever you want to insert a new row, just call the method addRow of your DefaultTableModel instance. You don't need to call the setModel again as long you are calling the addRow method of the same instance as the one used to create the JTable

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.