aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Hiding text in JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Hiding text in JTable" Watch "Hiding text in JTable" New topic
Author

Hiding text in JTable

John Vorwald
Ranch Hand

Joined: Sep 26, 2010
Posts: 139
Hi,
I have a table listing some information including a color. The color is displayed by changing the background color of the table. The text describing the color is "hidden" by changing the text color to match the background. Is it possible to turn off the text display?

Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19720
    
  20

Use a customized TableCellRenderer that does not display the text.

I'll move this thread to our user interface forum.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Hiding text in JTable