public class TableTest
{
public static void main(String[] args)
{
MyFrame frame = new MyFrame("Table Test");
frame.setVisible(true);
}
}
class MyFrame extends JFrame implements ActionListener
{
MyTableModel model = new MyTableModel();
JButton addButton = new JButton("Add");
JButton deleteButton = new JButton("Delete");
private static final int WIDTH = 800;
private static final int HEIGHT = 600;
MyFrame(String title)
{
super(title);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JFrame.setDefaultLookAndFeelDecorated(true);
JPanel p = new JPanel();
p.add(addButton);
p.add(deleteButton);