Hi

You can make use of java Themes, but it only applies to Metal LookAndFeel.

Here is how it works.

Call this API before you create the UI objects.

javax.swing.plaf.metal.MetalLookAndFeel.setCurrentTheme( MetalTheme );

extend javax.swing.plaf.metal.DefaultMetalTheme and override the required
UIManager parameters.
eg:
UIManager.getDefaults().put("TextFied.foreground", myColor1);
UIManager.getDefaults().put("TextFied.background", myColor2);

NOTE: this works only if you set the L&F to Metal.

Thanks
Madhav

----- Original Message -----
From: "Paul Franz" <[EMAIL PROTECTED]>
To: "JDJList" <[EMAIL PROTECTED]>
Sent: Friday, September 06, 2002 4:55 PM
Subject: [jdjlist] Re: Modify default swing parameters


| The only way I can think of is to define your own "Look and Feel".
|
| Paul Franz
| ----- Original Message -----
| From: "Sebastien RODRIGUES" <[EMAIL PROTECTED]>
| To: "JDJList" <[EMAIL PROTECTED]>
| Sent: Friday, September 06, 2002 6:57 AM
| Subject: [jdjlist] Modify default swing parameters
|
|
| Hi,
|
| How i can modify the default background and foreground of all JTextField?
| I don't want to use the setBackground or setForegroound method in all my
| JTextField!!
|
| Regards.
|
|
| To change your JDJList options, please visit:
| http://www.sys-con.com/java/list.cfm
|
|
|
| To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm


To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm

Reply via email to