FileDocCategorySizeDatePackage
ColumnExample.javaAPI DocExample992Mon Nov 09 12:45:48 GMT 1998None

ColumnExample

public class ColumnExample extends JFrame

Fields Summary
Constructors Summary
public ColumnExample()

    super("Abstract Model JTable Test");
    setSize(300, 200);
    addWindowListener(new BasicWindowMonitor());

    DefaultTableModel dtm = new DefaultTableModel(
                              new String[][] { 
                                {"1", "2", "3"}, 
                                {"4", "5", "6"} },
                              new String[] {"Names", "In", "Order"});
    SortingColumnModel scm = new SortingColumnModel();
    JTable jt = new JTable(dtm, scm);
    jt.createDefaultColumnsFromModel();

    JScrollPane jsp = new JScrollPane(jt);
    getContentPane().add(jsp, BorderLayout.CENTER);
  
Methods Summary
public static voidmain(java.lang.String[] args)

    ColumnExample ce = new ColumnExample();
    ce.setVisible(true);