For the portions of the jtable that do NOT have rows in them, the background is by default grey, in JDK 1.3.0. However, in JDk 1.2.2 and earlier, you could set the background color, w/ setBackground(Color). This doesn't work in JDK 1.3.0. Does anybody know how to fix that?
Jagan Mohan Reddy
Joined: May 15, 2001
Hi, I think you are using a scrollpane over the table. The grey portion is not the table area but the view port area. so set the background for the view port.
the code for getting the background color is table.setBackground(Color.red); table.getViewport().setBackground(Color.red);
I think this solves ur problem.
Regards, Jagan Mohan Reddy.
Joined: Jan 07, 1999
"tmtully", The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements. Thanks.