This my new MyJtable
public void addWidget(Book w) {
datalist.add(w);
fireTableRowsInserted(datalist.size()-1, datalist.size()-1);
}
calling class
MyJtable tv = new MyJtable(a);
table = new JTable(tv);
//tv.addWidget(b3);
JScrollPane pane2 = new JScrollPane(table);
button CLick function
public void actionPerformed(ActionEvent e)
{
MyJtable tv1 = new MyJtable();
Book b3 = new Book ("Java nutshell-299", "Ajfdfdfdingya2") ;
if("Add".equals(e.getActionCommand()))
{
JOptionPane.showMessageDialog(null,"Add button is clicked");
tv1.addWidget(b3);
}
when i click button then i don't see any GUI chnage but if call
tv1.addWidget(b3);
}
before , i mean on load then i can see the new book but not on button click