File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes making a row grey in JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "making a row grey in JTable" Watch "making a row grey in JTable" New topic
Author

making a row grey in JTable

Pristi Sanyal
Greenhorn

Joined: Jan 09, 2003
Posts: 1
i m facing a problem in making a row grey which is not editable. Rest all the rows are editable. I have to make the first row grey. But when qrite code to make 1 row grey, it greys out the whole table.. do any1 have the solution
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
You need your own renderer (implement TableCellRenderer). Override this method:

Just check on what you need and set the color.
 
GeeCON Prague 2014
 
subject: making a row grey in JTable