AbstractTableModel.fireTableStructureChanged()
I'm having trouble trying to refresh my JTable it seems
that all of my data have been repeated twice this is a major inconvinience is there anyway I can implement the AbstractTableModel.fireTableStructureChanged()
it was said that it could upload the data again so it wouldn't be any repitition anyway here is the program
before that thank you for trying to help me solve this
import java.util.*;
import java.io.*;
import javax.swing.*;
import java.awt.*;
import javax.swing.table.*;
import java.util.Vector;
public class AddressTable extends JPanel
{
AddressBook addbook;
DefaultTableModel tablemodel = new DefaultTableModel();
JTable jt;
public AddressTable(AddressBook addbook)
{
this.addbook = addbook;
jt = new JTable(addbook.showTable());
add(new JScrollPane(jt));
setLayout(new FlowLayout());
}
public void refreshlist()
{
jt = new JTable(addbook.showTable());
}
/
}
|