Object[][] cells = {
{Boolean.FALSE, "必选","",""},
{Boolean.FALSE, "可选","",""},
{Boolean.FALSE, "必选","",""},
{Boolean.FALSE, "可选","",""},
{Boolean.FALSE, "必选","",""},};
String[] columnNames = {"选择","重要级","文件名","说明"};
DefaultTableModel model = new DefaultTableModel(cells, columnNames) {
public Class getColumnClass(int columnIndex)
{
return columnIndex == 0 ? Boolean.class : String.class;
}
};
{Boolean.FALSE, "必选","",""},
{Boolean.FALSE, "可选","",""},
{Boolean.FALSE, "必选","",""},
{Boolean.FALSE, "可选","",""},
{Boolean.FALSE, "必选","",""},};
String[] columnNames = {"选择","重要级","文件名","说明"};
DefaultTableModel model = new DefaultTableModel(cells, columnNames) {
public Class getColumnClass(int columnIndex)
{
return columnIndex == 0 ? Boolean.class : String.class;
}
};
有详细 代码最好···谢谢···