Java Utililty Methods Swing UIManager

List of utility methods to do Swing UIManager

Description

The list of methods to do Swing UIManager are organized into topic(s).

Method

JSeparatorcreateHorizontalLine()
create Horizontal Line
JSeparator horizontalSeparator = new JSeparator() {
    private final int maxHeight = isNimbusLookAndFeel() ? 2
            : isGTKLookAndFeel() ? 3 : isAquaLookAndFeel() ? 6 : 1;
    private final boolean customPaint = isAquaLookAndFeel();
    public Dimension getMinimumSize() {
        return getPreferredSize();
    public Dimension getMaximumSize() {
...
JLabelcreateMessageLabel(String message)
create Message Label
Color color = UIManager.getColor("OptionPane.messageForeground");
Font messageFont = UIManager.getFont("OptionPane.messageFont");
JLabel label = new JLabel(message, JLabel.LEADING);
if (color != null) {
    label.setForeground(color);
if (messageFont != null) {
    label.setFont(messageFont);
...
JTabbedPanecreateTabbedPane(int tabPlacement)
create Tabbed Pane
switch (tabPlacement) {
case JTabbedPane.LEFT:
case JTabbedPane.RIGHT:
    Object textIconGap = UIManager.get("TabbedPane.textIconGap");
    Insets origInsets = UIManager.getInsets("TabbedPane.tabInsets");
    Insets tabInsets = origInsets;
    if (tabInsets == null) {
        tabInsets = new Insets(2, 2, 2, 2);
...
voiddecorateMissingValue(JComponent jComponent, boolean missingValueState)
decorate Missing Value
jComponent.setBackground(missingValueState ? requiredBgColor : defaultBgColor);
intdefaultColumnWidth()
Column width for JTable, based on global defaults.
return defaultTableCellSize().width;
Tdestylize(T comp)
destylize
Color c = UIManager.getColor("Panel.background");
Color background = new Color(c.getRed(), c.getGreen(), c.getBlue());
c = UIManager.getColor("Panel.foreground");
Color foreground = new Color(c.getRed(), c.getGreen(), c.getBlue());
comp.setBackground(background);
comp.setForeground(foreground);
comp.setBorder(null);
return comp;
...
IcondisabledIcon(JComponent parent, Icon icon)
Gets a "disabled" icon according to the current look and feel.
if (icon == null)
    return null;
Icon result = UIManager.getLookAndFeel().getDisabledIcon(parent, icon);
if (result != null)
    return result;
if (parent != null) {
    int width = icon.getIconWidth();
    int height = icon.getIconHeight();
...
voiddisablePaintSliderValue()
disable Paint Slider Value
UIManager.put("Slider.paintValue", false);
voiddrawVistaBackground(Graphics g, Component b, String prefix)
draw Vista Background
drawVistaBackground(g, 0, 0, b.getWidth(), b.getHeight(), UIManager.getColor(prefix + ".gradientStart"),
        UIManager.getColor(prefix + ".gradientMiddle"), UIManager.getColor(prefix + ".gradientEnd"));
voidfixGtkPopupStyle()
fix Gtk Popup Style
if (!isUnderGTKLookAndFeel()) {
    return;
final SynthStyleFactory original = SynthLookAndFeel.getStyleFactory();
SynthLookAndFeel.setStyleFactory(new SynthStyleFactory() {
    @Override
    public SynthStyle getStyle(final JComponent c, final Region id) {
        final SynthStyle style = original.getStyle(c, id);
...