全文预览

java课程设计简单日历

上传者:业精于勤 |  格式:doc  |  页数:15 |  大小:0KB

文档介绍
ysTable = new CalendarTable(daysModel, calendar); daysTable.setCellSelectionEnabled(true); daysTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); daysTable.setDefaultRenderer(daysTable.getColumnClass(0), new TableCellRenderer() { ponent ponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { String text = (value == null) ? "": value.toString(); JLabel cell = new JLabel(text); cell.setOpaque(true); if (row == 0){ cell.setForeground(headerForeground); cell.setBackground(headerBackground); } else { if (isSelected) { cell.setForeground(selectedForeground); cell.setBackground(selectedBackground); } else { cell.setForeground(foreground); cell.setBackground(background); }} return cell; } }); updateView(); cPane.add(daysTable, BorderLayout.CENTER);

收藏

分享

举报
下载此文档