I am trying to customize Colors
in a JTabbedPane
. I've tried everything and nothing seems to work. I need to change the white color in the image.
Please help. image here
and this is my code
UIManager.put("TabbedPane.contentBorderInsets", new InsetsUIResource(2, 0, 0, 0));//border
UIManager.put("TabbedPane.contentAreaColor",new Color(158, 112, 93));//selected border color
UIManager.put("TabbedPane.darkShadow", new Color(107, 76, 63));//not selected border color
UIManager.put("TabbedPane.light", new Color(107, 76, 63));
UIManager.put("TabbedPane.borderHightlightColor", new Color(158, 112, 93));//border color
UIManager.put("TabbedPane.selected", new Color(107, 76, 63));//selected tab color
UIManager.put("TabbedPane.selectHighlight", new Color(158, 112, 93));
UIManager.put("TabbedPane.focus",new Color(107, 76, 63));//focus color
Not sure, but perhaps you can try ColorUIResource
like this:
UIManager.put("TabbedPane.contentAreaColor", new ColorUIResource(new Color(158, 112, 93)));
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.