This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: making a row grey in JTable
 
Similar Threads
Help with JavaScript Drop Down Box
Help with JavaScript Drop Down Box
make html fields not changable
Converting non-editable pdfs to editable pdfs
Enabling/Disabling Rows in JTable