I am using Nimbus Look and feel. I needs to change the Background color and foreground color of the tab in JTabbedPane but the color doesn\'t set in JTabbedPane. I tried set
Actually not true
new JTabbedPane().setUI(new YourUI());
and then you create your simple UI
public class YourUI extends BasicTabbedPaneUI{
.....
private class ScrollableTabPanel extends JPanel implements UIResource {
public ScrollableTabPanel() {
setLayout(null);
}
public void paintComponent(Graphics g) {
super.paintComponent(g);
g.setColor(Color.red);
g.fillRect(tabPane.getBounds());
}
}
....
}
Jan Cajthaml
There is how it should look like (don't mind the QuadSpline tabs and close bars thats another add-ons of my UI implementation), my reputation here is none so there is a link to the image
http://a5.sphotos.ak.fbcdn.net/hphotos-ak-ash3/166028_2974620064454_896181702_n.jpg