dcsimg
How to set color for JTable Cell if I use DefaultTableModel.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   janci_rani
Posted On:   Friday, November 2, 2001 04:28 AM

			

I am using DefaultTableModel class for populating the data, because i need to provide
options for Adding and removing rows and columns.

If any of the column is not having values, I need to highlight the row.
so please help me for this problem.



Thanks in advance

rgds
Jancirani

Re: How to set color for JTable Cell if I use DefaultTableModel.

Posted By:   Kenneth_Tennek  
Posted On:   Friday, November 2, 2001 05:01 AM

What you need to do is to create your own tablecellrenderer. This interface contains one method getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column). If value is null then you can give that cell another color.
About | Sitemap | Contact