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); }
public void updateTable() { jtable1.setModel(teamqueryController.getTableModel()); }