posted 21 years ago
I'm trying to use a ButtonGroup of JToggleButtons and a CardLayout to simulate the function of a JTabbedPane with a different look & feel. To do that I need to have the selected JToggleButton be the same color as the selected panel in the CardLayout. My problem is this - no matter what I do I can't get the selected JToggleButton to match the panel. I've tried setting the background color in the button to the exact color of the panel and then verifying that the colors are the same RGB color (in this case 204,204,204) but even then the button is darker than the surrounding area. What gives? I've also tried setOpaque(false) to no avail. Any help is appreciated. Thx.
Another solution to this problem would be changing the appearance of the tabs in a JTabbed Pane (I'm assuming in the TabbedPaneUI), but I don't know how to do that. If someone has an answer to this I would LOVE to hear it.
-Kevin