5 import javax
.swing
.event
.*;
6 import javax
.swing
.table
.*;
8 public class PtMainPanel
13 /* BoxLayout along x-axis may not be what we want here, this is just a
14 * quick and dirty solution to get panels to resize with frame resize
16 setLayout(new BoxLayout(this, BoxLayout
.X_AXIS
));
18 JTable tbl_student
= new StudentTable();
19 JTable tbl_session
= new SessionTable();
21 tbl_student
.getSelectionModel().addListSelectionListener(
22 new StudentSelectionListener(tbl_student
, tbl_session
));
25 JPanel pnl_student
= new JPanel();
27 pnl_student
.setLayout(new BorderLayout());
28 pnl_student
.setBorder(BorderFactory
.createTitledBorder(
29 BorderFactory
.createTitledBorder("Student")));
30 pnl_student
.add(new JScrollPane(tbl_student
));
32 JPanel pnl_session
= new JPanel();
34 pnl_session
.setLayout(new BorderLayout());
35 pnl_session
.setBorder(BorderFactory
.createTitledBorder(
36 BorderFactory
.createTitledBorder("Session")));
37 pnl_session
.add(new JScrollPane(tbl_session
));
42 // add(new StudentPanel());
43 // add(new SessionPanel());