customtablemodel.java~1~

来自「图书管理系统」· JAVA~1~ 代码 · 共 38 行

JAVA~1~
38
字号
/*
 * CustomTableModel.java
 *
 * Created on 2007年6月21日, 上午9:23
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package 图书管理系统;
import javax.swing.table.*;
public class CustomTableModel extends DefaultTableModel
{
    String [] columnNames;
    Class []dataType;
    public CustomTableModel(int r,int c,String []cn,Class []dataType)
    {
        super(r,c);
        columnNames=cn;
        this.dataType=dataType;
    }
    public boolean isCellEditable(int row, int col)
    {  
        return false;
    }
    public String getColumnName(int c)
    {  
        return columnNames[c];
    }		
    public Class getColumnClass(int c)
    {
        return dataType[c];
    }
		
}
    

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?