Changing the JTaskPaneGroup foreground and background colors

JTaskPaneGroup colors are controlled by the look and feel and can (at this time) be modified only by adding custom values in UIManager.

Here is how you can force the colors used by the JTaskPaneGroup. The UIManager keys to override are:

TaskPaneGroup.background - the content pane background
TaksPaneGroup.specialTitleBackground - the title background for a "special" JTaskPaneGroup
TaskPaneGroup.specialTitleForeground
TaskPaneGroup.titleBackgroundGradientStart
TaskPaneGroup.titleBackgroundGradientEnd
TaskPaneGroup.titleForeground

If you need to do something similar for the JTaskPane, the UIManager keys you are interested in are:

TaskPane.background
TaskPane.useGradient
TaskPane.backgroundGradientStart
TaskPane.backgroundGradientEnd

The key TaskPane.background is used only by the Metal UI implementation. As example if you want some green gradient background, add the following near the place where you set your look and feel and theme:

UIManager.put("TaskPane.useGradient", Boolean.TRUE);
UIManager.put("TaskPane.backgroundGradientStart", Color.green.darker());
UIManager.put("TaskPane.backgroundGradientEnd", Color.green.darker().darker);


 
Copyright © 2004-2006 L2FProd.com