File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes JTable column help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable column help" Watch "JTable column help" New topic

JTable column help

Ron Summer

Joined: Feb 05, 2010
Posts: 8
Howdy all,
I've been lurking for some time now and have gotten some great help from this site.
But I could not find what I was looking for in the archives. So here is where I'm asking for help.

My JTable is using a data model that has a column that is used to set the row color. When I display the table I get the column with the color data displayed which I don't want. When I do a remove of the column I don't get my row colors displayed which I do want.

This is my table model class:

This is my implementation of the table

I'm still a newbie at Java, so I'm still in the learning curve. As a newbie I could have the whole logic wrong so ......
Any help? An example would be great? A pointer to a tutorial? Anything that would help me move this project forward!
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

"Ron Whyaskme", please check your private messages regarding an important administrative matter.

Thank you.
pete stein

Joined: Feb 23, 2007
Posts: 1561
You may want to post a small compilable program that demonstrates your problem. That way we can compile and run your code and see where the problems may be. I myself would really like to see how you are rendering your cells. For instance, here's my example of this (though note I'm no expert at table cell rendering):

subject: JTable column help
It's not a secret anymore!