Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't get rid of the JTable's white column divider

Status
Not open for further replies.

rsfoley

Programmer
Apr 16, 2002
56
US
I want a JTable that has no grid lines and no space between cells, with or with out headers. Basically all cells should butt against each other with no grid lines.

So far I have succeeded with this, with a exception to some white divider that is about 2 pixels wide that separates each column. I tried every JTable, Header, Column Model, Table Model, Cell Renderer, etc method that sounds like it. Nothing seems to work.

If anyone knows how to do this, or has any ideas please post them...

Thanks,

Rodney
 
Have you tried setting the background color of the JTable component to match the cell background color? I'm just guessing.... I'd like to see how you achieved what you did so far. Did you sub-class JTable?
 
First that would just hide the problem, and second I fixed the problem a few days ago. Forgot to override the toString() method in my cell renderer to return and empty string. It was returning the class and package name so it was showing this 2 pixel line trying to display this there.

Thanks for the response though...

Rodney
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top