posted 7 years ago
First Time Member: Code Ranch
Hi Everyone, I joined CodeRanch yesterday. I hope this is the right place to post this.
How can we change the color of the active tabs on JTabbedpanes; with two JTabbedpanes being displayed one below the other. I have been able to use the UIManager to this point to change the appearance, but cannot have two different colored Active tabs at the same time. If someone can please look at the code and tell me what I am doing wrong, with regards to having two different colors it would be greatly appreciated. Also I hope the code I have written, with the help of stack overflow, caveofprogramming, oracle docs, and others will benefit somebody else with similar problems. Right now the code displays two tabbed panes, one under the other, with a different looking UI and the same colored Active Tab (Light Green). I am trying to have a light green Active tab for the top JTabbedPane, and a dark green Active tab for the bottom tab.
My question: How can we display two different active tabs on two different tabbedpanes by overriding the UI, or by any other means. I have been able to display the new UI for the top Tabpane, and the System UI with the bottom pane, but am unsure actually how everything fits. I have tried to find answers to this.
Kind regards
The code:
Any help with this would be grealty appreacted.