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="Rhino, post: 605544"] I chose to do a similar thing in one of my applets a while back. This is a fragment of my code which involves overriding the default attributes in the UIManager; this code works fine: /* * Set the colour of the selected tab in the tabbed pane. Set the colour * of scrollbars. See src/java/swing/plaf/basic/BasicLookAndFeel.java in * src.jar for definitions of many of the default colours used in Java. */ UIManager.put("TabbedPane.selected", SELECTED_TAB_COLOUR); //ScrollBar.thumb -> knob UIManager.put("ScrollBar.thumb", SCROLLBAR_KNOB_COLOUR); //ScrollBar.background -> track UIManager.put("ScrollBar.background", SCROLLBAR_TRACK_COLOUR); //ScrollBar.thumbHighlight -> dimples on knob UIManager.put("ScrollBar.thumbHighlight", SCROLLBAR_KNOB_HIGHLIGHT_COLOUR); //control -> default colour for controls (buttons, sliders, etc.) UIManager.put("control", CONTROL_BACKGROUND_COLOUR); By the way, SELECTED_TAB_COLOUR and the other all-capitalized variable names all originate in an interface I built to store the colours which are supposed to be used in the GUI. You could imitate that technique or replace them with constants like Color.black, as in your example. Rhino [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
Simple swing (UI L and F) problem
Top