// create a JFrame to hold the table
JFrame f = new JFrame("ShipTable v1.0");
f.addWindowListener(new WindowAdapter( ) {
public void windowClosing(WindowEvent e) { System.exit(0); }
});
f.setSize(500, 200);
f.setLocation(200, 200);
// create the data model and the JTable
TableModel model = new ShipTableModel( );
JTable table = new JTable(model);
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
// put it all together
f.getContentPane( ).add(new JScrollPane(table));
f.setVisible(true);