getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
是不是这个??
是不是这个??
解决方案 »
- 表有id,name,password三个字段,请写段程序将该表的数据导入到”/d:/name.xml”
- 关于myeclipse的tomcat和JBoss疑惑
- 奇怪的NoClassDefFoundError问题
- 用hiberenate的save方法插入表中数据,程序中显示插入成功,但数据库中没有记录
- 自学(网站制作,FLASH,photoshop,3D)者,一定要看的网站。
- jsp数据库连接小问题
- 我的MD5加密出来的怎么不一样?
- struts问题:导数据!详细情况请进!
- 求救
- Eclipse中Rebuild Index,进度瞬间完成
- 求jboss中会话bean访问实体bean例子及部署文件。
- 有没有准备跳的兄弟
protected Object[][] data = null; public Object getValueAt(int row, int column) { return data[row][column]; } public Component getTableCellRendererComponent(
JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column) { if ( ... ) {
setBackground(Color.gray);
} else {
setBackground(Color.writer);
} return super.getTableCellRendererComponent(
table,
value,
isSelected,
hasFocus,
row,
column);
}
};TableColumnModel columnsize = table.getColumnModel();
columnsize.getColumn(1).setCellRenderer(color);