This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JTable Custon Renderes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable Custon Renderes" Watch "JTable Custon Renderes" New topic

JTable Custon Renderes

sachin pathak

Joined: Jun 05, 2002
Posts: 27
Hi all
I am trying to implement a table with alternating row colors. For the purpose I have written following code

The problem with this code is as soon as I set the renderer for boolean fields to my custom renderer it starts showing values tru and false instead of the check boxes. I have not even over -ridden the method getTableCellRendererComponent(...) (please notice that I have commented it out in the Boolean renderer.). The same thing happens for the Iteger renderes as well, instead of showing the default right alignment it starts showing the left alignment for the text.

Can anybody spot out where I am goinf wrong ?

Thanks and regards
Sachin Pathak
I agree. Here's the link:
subject: JTable Custon Renderes