By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,352 Members | 1,593 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,352 IT Pros & Developers. It's quick & easy.

How to Change Table Background

P: 5
I have a JTable that I am displaying in a JScrollpane. The JTable only
displays a few rows of information in its grid. The space below the
grid to the bottom of the JPanel,
that contains the JScrollpane, (Which in turn contains the JTable) is
colored solid gray.
I'd like to change that color to white. I tried setting the JTable's
background color to
white, [using the method setBackground(Color,WHITE) ] but that didn't
work.

Can anyone tell me which method to use to change that gray to white?
Apr 10 '09 #1
Share this Question
Share on Google+
1 Reply


Expert 10K+
P: 11,448
@raggwd
Your JTable doesn't completely cover the area of your JPanel so you should set the background color of your JPanel separately.

kind regards,

Jos
Apr 10 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.