摘要: JTable类生成的对象以该TableModel为参数,并负责将TableModel对象中的数据以表格的形式显示出业。
/***日历类,提供日历功能*/
public class TableDemo extends JPanel implements
ActionListener,MouseMotionListener,MouseListener{
final private String TITLES[]={"星期日","星期一","星期二","星期三","星期四",
"星期五","星期六"};
final private int ROW_HEIGHT=20;
final private int ROW_WIDTH=40;
private JTable tbMain;//表格
private JLabel lblTitle;//标题
private JButton btnNextMonth;//下个月的按钮
private JButton btnPrevMonth;//上个月
阅读全文