4 import java
.awt
.event
.*;
6 import javax
.swing
.event
.*;
7 import javax
.swing
.table
.*;
9 public class StudentTable
11 implements ListSelectionListener
15 setModel(new StudentTableModel());
16 setColumnSelectionAllowed(false);
18 /* limit user selection to only one student at a time */
19 getSelectionModel().setSelectionMode(
20 ListSelectionModel
.SINGLE_SELECTION
);
21 getSelectionModel().addListSelectionListener(this);
24 public void valueChanged(ListSelectionEvent e
)
26 if (e
.getValueIsAdjusting()) {
30 /* TODO: tell the session table to update its session listings */
31 System
.out
.println(e
);
33 /* for some reason we need this to make sure the table visibly updates
34 * its row selection */