hook up a skeleton ListSelectionListener to StudentTable
[se-panther.git] / src / panther / ui / StudentTable.java
blob0da8798482b28817c2437fc56b50318558aa9a33
1 package panther.ui;
3 import java.awt.*;
4 import java.awt.event.*;
5 import javax.swing.*;
6 import javax.swing.event.*;
7 import javax.swing.table.*;
9 public class StudentTable
10 extends JTable
11 implements ListSelectionListener
13 public StudentTable()
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()) {
27 return;
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 */
35 repaint();