예제 #1
0
  public void addJTable() {

    jtable1 = new JTable(teamqueryController.getTableModel());
    // add a ListSelectionListener to the table
    jtable1.getSelectionModel().addListSelectionListener(teamqueryController);

    // add the table to a scrollpane
    JScrollPane scrollpane = new JScrollPane(jtable1);
    // create a window
    jPanel1.setLayout(new BorderLayout());
    jPanel1.add(scrollpane, BorderLayout.PAGE_END);
  }
예제 #2
0
 public void updateTable() {
   jtable1.setModel(teamqueryController.getTableModel());
 }