views:

48

answers:

3

I didn't like the default look and feel in java. i am using netbeans.

I wanted windows like look and feel.so i included:

try
{
        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch(Exception e) { } 

i have 10 tabs in my frame.After user does some work in each tab(click radiobutton etc),I have to set the background of that tab.

tab.setBackgroundAt(j,new Color(255,0,0));//tab is JTabbedPane

the look and feel is ignoring the above line.I don't want to change the look and feel.

A: 

Tools -> Options -> Editor -> Formatting or Code Templates

James Lin
A: 

An an alternative to changing the look and feel, you might be able to achieve something appealing by using Tabs With Custom Components.

trashgod
A: 

Apparently, it is still this issue. Sun thought it was not a defect that you can not set a background for a JTabbedPane. Only Metal LaF seems to respect this value; Nimbus, GTK+, and even Motif draw their own background.

Try setting custom components for tabs. Maybe user-created labels will respect the background property.

tulskiy