• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable + background colour

 
david allen
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using JTable to display a list of records that are inserted and removed at run time. I have no way of knowing how many will be in there at any given time.
I have set the background colour to white which is fine when there are records in the table. However, when there are say only 2 records in the table the remainging space of the table is the default grey. Is there anyway I can make the empty part of the table white as well or does the background property only relate to records in the table?
Thank you
David
 
Wayne L Johnson
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without seeing the code I can only guess, but most likely you have put your JTable instance in a "JScrollPane" to manage the scrolling. Just set the background color of the JScrollPane to white as well.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!