I have created a JTable table
String[] ColumnNames = { "Name" , "Father Name", "D.O.B" };
Object[][] data;
DefaultTableModel model = new DefaultTableModel(data, columnNames);
JTable table = new JTable(model);
JScrollPane pane = new JScrollPane(table);
JPanel panel = new JPanel();
panel.add(pane);
So what I want to do is when I populate Object data
(not initialized yet, but it get populated correctly no issue here), table rows should also be updated with new data and when I search again and If no result is found then table should be empty.
In short I want to update table every time I hit "Search" button. Increase/Decrease in rows.