3

How do you set the actual content pane's background to be Opaque, the panels that I add to it I have already set Opaque but the tabbedpane main area keeps showing up as blue even when I do

JTabbedPane tabbedPane = new JTabbedPane();
tabbedPane.setOpaque(false);
sl133
  • 1,339
  • 2
  • 15
  • 28
  • 1
    For better help sooner, post an [SSCCE](http://sscce.org/). – Andrew Thompson May 20 '12 at 02:20
  • One what? The question still lacks an SSCCE & you did not have time to read the linked article. – Andrew Thompson May 20 '12 at 02:22
  • 3
    I know what SSCCE is and there is no point for it here. – sl133 May 20 '12 at 02:30
  • Needs a picture, too. What Look & Feel? [Duplicate](http://stackoverflow.com/questions/8752037/how-to-change-background-color-of-jtabbedpane/8752166#8752166)? – trashgod May 20 '12 at 02:40
  • 2
    *"there is no point for it here"* There is if you want my help. I am guessing that means you see no point to my help. Good luck with it. – Andrew Thompson May 20 '12 at 02:47
  • I've seen that thread trashgod, but I have tried that way and it did not work. Andrew If I post an SSCCE it will just be two lines in a main. – sl133 May 20 '12 at 02:50
  • That duplicate would work for changing the Purple to Transparent, but that is on a JPanel and is not the actual JTabbedPane – sl133 May 20 '12 at 03:02

1 Answers1

8

If you add

UIManager.put("TabbedPane.contentOpaque", false);
JTabbedPane tabbedPane = new JTabbedPane();

Then this solves the opacity problem.

sl133
  • 1,339
  • 2
  • 15
  • 28