Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
Simple swing (UI L and F) problem
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="James Kimble, post: 605538"] I've been given the task up updating the appearence (ie color when selected or not) of some JToggleButtons on a fairly large application and it seems like a really bad idea to do this via btn.setBackground or btn.setForeground etc... I know it should be done via a UIManager to uniformly set the look and feel of these buttons to something different than the default. The problem I have is that I have no idea how to do this and I haven't been able to find anything useful on the internet. The original author did some of this stuff but changing doesn't seem to change the appearance of the app and I have to wonder if it's doing anything at all. --------------------------------------------------------------- UIDefaults def = UIManager.getDefaults(); Object buttonBorder = new UIDefaults.ProxyLazyValue( "javax.swing.plaf.basic.BasicBorders", "getButtonBorder"); def.putDefaults(new Object[] { "Button.border", buttonBorder, "ProgressBar.selectionForeground", Color.black, "ProgressBar.selectionBackground", Color.black, "Panel.background", Color.gray, "Button.background", Color.gray, "Label.background", Color.gray, } ); ------------------------------------------------------------ Can someone give me a hint or point me to a useful resource for this type of thing. How hard can it possibly be? Any help much appreciated.... [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
Simple swing (UI L and F) problem
Top