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
posted 12 years ago
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.