Example usage for javax.swing JToggleButton setForeground

List of usage examples for javax.swing JToggleButton setForeground

Introduction

In this page you can find the example usage for javax.swing JToggleButton setForeground.

Prototype

@BeanProperty(preferred = true, visualUpdate = true, description = "The foreground color of the component.")
public void setForeground(Color fg) 

Source Link

Document

Sets the foreground color of this component.

Usage

From source file:org.datacleaner.windows.AnalysisJobBuilderWindowImpl.java

private JToggleButton createViewToggleButton(final String text, final String iconPath) {
    final ImageIcon icon = imageManager.getImageIcon(iconPath);
    final JToggleButton button = new JToggleButton(text, icon);
    button.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
    button.setFont(WidgetUtils.FONT_SMALL);
    button.setForeground(WidgetUtils.BG_COLOR_BRIGHTEST);
    button.setBackground(WidgetUtils.BG_COLOR_DARK);
    button.setBorderPainted(false);// ww w.j  a  v  a  2 s . c  om
    button.setBorder(new CompoundBorder(WidgetUtils.BORDER_THIN, new EmptyBorder(0, 4, 0, 4)));
    return button;
}