FileDocCategorySizeDatePackage
PagingTester2.javaAPI DocExample1193Thu Oct 24 20:14:26 BST 2002None

PagingTester2

public class PagingTester2 extends JFrame

Fields Summary
Constructors Summary
public PagingTester2()

    super("Paged JTable Test");
    setSize(300, 200);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    
    final PagingModel pm = new PagingModel();
    final JTable jt = new JTable(pm);

    // Use our own custom scrollpane.
    JScrollPane jsp = PagingModel.createPagingScrollPaneForTable(jt);
    getContentPane().add(jsp, BorderLayout.CENTER);

    // Property features testing
    JPanel p = new JPanel();
    p.add(new JLabel("Page Size: "));
    final JTextField tf = new JTextField("100", 6);
    p.add(tf);
    tf.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent ae) {
        pm.setPageSize(Integer.parseInt(tf.getText()));
      }
    });
    getContentPane().add(p, BorderLayout.SOUTH);
  
Methods Summary
public static voidmain(java.lang.String[] args)

    PagingTester2 pt = new PagingTester2();
    pt.setVisible(true);