Hi,
Has anyone figured out how to make tabAreaBackground transparent? I
override the tabbedpaneUI#paintTabArea like so:
protected void paintTabArea(Graphics g, int tabPlacement, int
selectedIndex) {
int tw = tabPane.getBounds().width;
int th = tabPane.getBounds().height;
g.setColor(tabAreaBackground);
g.fillRect(0, 0, tw, th);
super.paintTabArea(g, tabPlacement, selectedIndex);
}
WIth this I get control of the background tranparent Color(0,0,0,0)or
anyother color, however it doesnt do it right, in that it doesnt let
the background of the component beneath the tabbedpane to bleed thru.
There has to be a better way to set the tab area background to be
transparent.
Benoit Peltier - 30 Jan 2006 12:24 GMT
Have you tried ::
tabbedPane.setOpaque( false );
Benoit
> Hi,
> Has anyone figured out how to make tabAreaBackground transparent? I
[quoted text clipped - 16 lines]
> There has to be a better way to set the tab area background to be
> transparent.
veryhairydog - 30 Jan 2006 15:19 GMT
yep...that be the first line i tried. however that only affects the
content background, not the tab background.
Andrey Kuznetsov - 31 Jan 2006 13:35 GMT
> yep...that be the first line i tried. however that only affects the
> content background, not the tab background.
are tabs wrapped or scrolled?

Signature
Andrey Kuznetsov
http://uio.imagero.com Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities
veryhairydog - 02 Feb 2006 06:48 GMT
tried both....same deal...
Andrey Kuznetsov - 02 Feb 2006 11:39 GMT
before painting you could try to get bounds rect of every tab and set clip
on Graphics.

Signature
Andrey Kuznetsov
http://uio.imagero.com Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities