Need help with JTabledPane  
Author Message
shoa





PostPosted: 2005-4-15 2:38:00 Top

java-programmer, Need help with JTabledPane Hello all

I have JTabledPane in my application. In it I have some tabs with titles
"Tab 1", "Tab 2" and "Tab 3". I want to have the color of the title "Tab 3"
is red (so it is easy to recognize). Is it possible?. Could you please
help..

I tried to use add a red label for the title's tab but it does not work.
Thank you


 
Arnaud Berger





PostPosted: 2005-4-14 14:22:00 Top

java-programmer >> Need help with JTabledPane Hi,

Sure, you can use :

jTabbedPane.setBackgroundAt(index, Color.RED) ;
for the background, or
jTabbedPane.setForegroundAt(index, Color.RED) ;
for the foreground (color of text)

where "index" is the int index of your tab (probably 2 in your case).

Regards,

Arnaud

"shoa" <email***@***.com> a 閏rit dans le message news:
1113429312.376628@ftpsrv1...
> Hello all
>
> I have JTabledPane in my application. In it I have some tabs with titles
> "Tab 1", "Tab 2" and "Tab 3". I want to have the color of the title "Tab
3"
> is red (so it is easy to recognize). Is it possible?. Could you please
> help..
>
> I tried to use add a red label for the title's tab but it does not work.
> Thank you
>
>