Article View: borland.public.jbuilder.java.swing
Article #10128Re: L&F primary colors
From: John P. McGrath
Date: Tue, 09 Nov 1999 00:00
Date: Tue, 09 Nov 1999 00:00
28 lines
1329 bytes
1329 bytes
On Tue, 9 Nov 1999 15:52:49 +0200, Ronen wrote: > I'm using MetalLookAndFeel > Does anyone knows how can I change the primary colors > (ScrollBars, Selected items background, splitters, etc..) I think you can do this using the UIDefaults class. I have not tried it, but I think it goes something like this: UIDefaults defaults = UIManager.getDefaults(); defaults.put( "ScrollBar.shadow", Color.blue ); As far as I can tell, the names of the properties used by the various Swing look-and-feel classes is not documented, but they are easy to find by looking at the source code. For example, MetalScrollBarUI uses the following properties for its colors: ScrollBar.shadow ScrollBar.highlight ScrollBar.darkShadow ScrollBar.thumb ScrollBar.thumbShadow ScrollBar.thumbHighlight -- John P. McGrath <mcgrath@enter.net> <jpm@nscs.fast.net>
Technical Details
Message-ID:
<MPG.1292c577dd779fb59896a4@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<8098vf$j5511@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,8535edc2c8bfaefe X-Google-Attributes: gid111d45,public From: John P. McGrath <mcgrath@enter.net> Subject: Re: L&F primary colors Date: 1999/11/09 Message-ID: <MPG.1292c577dd779fb59896a4@forums.borland.com> X-Deja-AN: 546756094 References: <8098vf$j5511@forums.borland.com> Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.swing