Reputation: 119
I want to change the white background behind the tabs. I tried to set different UIDefaults in UIManager to no avail. I thought changing the panel inside the tabbedpane would do it but it also didn't. Does anyone know how?
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
UIDefaults defaults = UIManager.getLookAndFeelDefaults();
defaults.put("Table.gridColor", new Color (214,217,223));
defaults.put("Table.selectionBackground", new Color(250,235,215));
defaults.put("Table.selectionForeground", Color.BLACK);
defaults.put("TabbedPane.background", new Color(175, 238, 238));
MainWindow frame = new MainWindow();
} catch (Exception e) {
e.printStackTrace();
}
}
});
Upvotes: 0
Views: 1038
Reputation: 159804
This will simply be the background color of the parent component. For example if the component is directly added to a JFrame
frame.getContentPane().setBackground(Color.RED);
Upvotes: 1