List of usage examples for javax.swing JButton setUI
@BeanProperty(hidden = true, visualUpdate = true, description = "The UI object that implements the LookAndFeel.") public void setUI(ButtonUI ui)
From source file:com.intel.stl.ui.common.view.ComponentFactory.java
public static JButton getIntelActionButton(ImageIcon icon, final Color enableColor, final Color disableColor, AbstractAction action) {/*from ww w . j av a2 s .c o m*/ JButton btn = new JButton(action) { private static final long serialVersionUID = 1L; @Override public void setEnabled(boolean b) { super.setEnabled(b); setForeground(b ? enableColor : disableColor); } }; btn.setIcon(icon); btn.setUI(new IntelButtonUI(UIConstants.INTEL_MEDIUM_BLUE, UIConstants.INTEL_MEDIUM_DARK_BLUE)); return btn; }
From source file:com.intel.stl.ui.common.view.ComponentFactory.java
public static JButton getIntelWizardStepButton(String text, final ActionListener listener) { JButton btn = new JButton(text) { /**//from w ww . j av a 2 s . c o m * */ private static final long serialVersionUID = 7408863234629205179L; @Override public void setEnabled(boolean b) { if (b) { addActionListener(listener); } else { removeActionListener(listener); } } }; btn.setUI(new IntelButtonUI(UIConstants.INTEL_MEDIUM_BLUE, UIConstants.INTEL_MEDIUM_DARK_BLUE)); btn.setBackground(UIConstants.INTEL_BLUE); btn.setForeground(UIConstants.INTEL_WHITE); return btn; }