I am making a networking app in java, which is a server that connects several terminals together. I wanted to give the server app a darker feel (grays and blacks), however I cannot seem to change the background color from its default light gray.
Here's a picture of my application so you can tell what I'm doing:
I tried using
this.getContentPane().setBackground(new Color(50, 50, 50));
however that didn't change the background color. I also tried changing the JScrollPane's background and foreground color, but that didn't do anything.
Changing the table's background only makes the background of the cells darker, not the rest of the window. Any help is appreciated!
Thanks
EDIT: Here is my code so far:
JTable serverList;
JScrollPane scrollPane;
Container container = this.getContentPane();
public GuiMain()
{
this.setLayout(new BorderLayout());
this.getContentPane().setBackground(new Color(50, 50, 50));
serverList = new JTable(Variables.servers, Variables.serversHeader);
serverList.setRowSelectionAllowed(true);
scrollPane = new JScrollPane(serverList);
serverList.setFillsViewportHeight(true);
add(scrollPane, BorderLayout.NORTH);
}