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 alternate row colors in jtable when cells are panels Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "alternate row colors in jtable when cells are panels" Watch "alternate row colors in jtable when cells are panels" New topic
Author

alternate row colors in jtable when cells are panels

sudheer kiran
Ranch Hand

Joined: Jun 26, 2008
Posts: 237

i wanted to have alternate row colors for my jtable.
it is working when table cell components are textfield or button.
its not working when i use jpanels as cell component.

thanks.


Sudheer
SCWCD, SCJP 5
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19695
    
  20

ItDoesntWorkIsUseless. Please show us your renderers.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4543
    
    5

To get better help sooner, post a SSCCE that clearly demonstrates your problem.


luck, db
There are no new questions, but there may be new answers.
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2182
    
    7
Table Row Rendering shows an alternative approach.
sudheer kiran
Ranch Hand

Joined: Jun 26, 2008
Posts: 237

thanks for the replies..i got it solved.
i have not set opaque to true for the panel so text field or button field is over writing.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: alternate row colors in jtable when cells are panels