# JTabbedPane transparent



## Gast2 (11. Mai 2009)

Servus,

Weiß jemand wie ich ein JTabbedPane transparent machen kann?

```
package view;
public class JMainFrame extends JFrame {

	private JPanel imagePanel;

	public JMainFrame() {
		setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
		setLayout(new BorderLayout());
                
                imagePanel = new JPanel();
                installPanel() ;
		add(imagePanel, BorderLayout.CENTER);

	}

	private void installPanel() {
		JTabbedPane pane = new JTabbedPane();

		pane.setOpaque(false);
		imagePanel.add(pane);
	}

	
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {

			@Override
			public void run() {
				new JMainFrame().setVisible(true);

			}

		});
	}

}
```


----------



## max40 (12. Mai 2009)

Ich glaub dies müsste in die Richtung gehen!
evtl. mit dem .3f rumspielen!

JAVA: 12.4.4 Transparenz in Java2D


```
((Graphics2D)g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_ATOP, .3f));
```


----------



## Gast2 (12. Mai 2009)

```
UIManager.put("TabbedPane.contentOpaque", Boolean.FALSE);
		UIManager.put("TabbedPane.tabsOpaque", Boolean.FALSE);
```

so klappts auch...


----------

