List of usage examples for javax.swing JButton setBackground
@BeanProperty(preferred = true, visualUpdate = true, description = "The background color of the component.") public void setBackground(Color bg)
From source file:com.intel.stl.ui.common.view.ComponentFactory.java
public static JButton getIntelDeleteButton(String text) { JButton btn = new JButton(text); btn.setUI(new IntelButtonUI(UIConstants.INTEL_MEDIUM_RED, UIConstants.INTEL_MEDIUM_DARK_RED)); btn.setBackground(UIConstants.INTEL_RED); btn.setForeground(UIConstants.INTEL_WHITE); // btn.setFont(UIConstants.H5_FONT); return btn;//from w w w .j av a 2 s . c o m }
From source file:com.intel.stl.ui.common.view.ComponentFactory.java
public static JButton getIntelActionButton(String text) { JButton btn = new JButton(text); btn.setUI(new IntelButtonUI(UIConstants.INTEL_MEDIUM_BLUE, UIConstants.INTEL_MEDIUM_DARK_BLUE)); btn.setBackground(UIConstants.INTEL_BLUE); btn.setForeground(UIConstants.INTEL_WHITE); // btn.setFont(UIConstants.H5_FONT); return btn;/*from w ww . j a v a2 s . c o m*/ }
From source file:com.intel.stl.ui.common.view.ComponentFactory.java
public static JButton getIntelActionButton(String text, Icon icon) { JButton btn = new JButton(text); btn.setUI(new IntelButtonUI(UIConstants.INTEL_MEDIUM_BLUE, UIConstants.INTEL_MEDIUM_DARK_BLUE)); btn.setBackground(UIConstants.INTEL_BLUE); btn.setForeground(UIConstants.INTEL_WHITE); btn.setIcon(icon);//w w w .j a va 2s . c o m return btn; }
From source file:com.intel.stl.ui.common.view.ComponentFactory.java
public static JButton getIntelCancelButton(AbstractAction action) { JButton btn = new JButton(action); btn.setUI(new IntelButtonUI(UIConstants.INTEL_BACKGROUND_GRAY, UIConstants.INTEL_LIGHT_GRAY)); btn.setBackground(UIConstants.INTEL_TABLE_BORDER_GRAY); btn.setForeground(UIConstants.INTEL_DARK_GRAY); // btn.setFont(UIConstants.H5_FONT); return btn;/*from ww w . ja v a 2 s .c om*/ }
From source file:com.intel.stl.ui.common.view.ComponentFactory.java
public static JButton getIntelDeleteButton(AbstractAction action) { JButton btn = new JButton(action); btn.setUI(new IntelButtonUI(UIConstants.INTEL_MEDIUM_RED, UIConstants.INTEL_MEDIUM_DARK_RED)); btn.setBackground(UIConstants.INTEL_RED); btn.setForeground(UIConstants.INTEL_WHITE); // btn.setFont(UIConstants.H5_FONT); return btn;/*ww w . j a v a 2s . com*/ }
From source file:com.intel.stl.ui.common.view.ComponentFactory.java
public static JButton getIntelActionButton(AbstractAction action) { JButton btn = new JButton(action); 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;/* w w w . j av a 2s .c o m*/ }
From source file:Cal.java
/** Unset any previously highlighted day */ private void clearDayActive() { JButton b; // First un-shade the previously-selected square, if any if (activeDay > 0) { b = labs[(leadGap + activeDay - 1) / 7][(leadGap + activeDay - 1) % 7]; b.setBackground(b0.getBackground()); b.repaint();/* w ww . j a v a 2 s . co m*/ activeDay = -1; } }
From source file:com.intel.stl.ui.common.view.ComponentFactory.java
public static JButton getDebugActionButton(String text) { JButton btn = new JButton(text) { private static final long serialVersionUID = 9164124909538571267L; @Override/*from ww w . j ava2 s .c om*/ public String toString() { return new String(getClass().getName() + "@" + hashCode()); } }; 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; }
From source file:DateChooserPanel.java
/** * Update the button labels and colors to reflect date selection. */// w w w .j a va 2 s .c o m private void refreshButtons() { final Calendar c = getFirstVisibleDate(); for (int i = 0; i < 42; i++) { final JButton b = this.buttons[i]; b.setText(Integer.toString(c.get(Calendar.DATE))); b.setBackground(getButtonColor(c)); c.add(Calendar.DATE, 1); } }
From source file:src.gui.LifelinePanel.java
public void buildBottonToolBar() { buttonPanel = new JPanel(new BorderLayout()); buttonPanel.setBackground(Color.WHITE); //JLabel test = new JLabel("<html><a href=\"http://www.google.com\">delete</a></html>"); JPanel leftpanel = new JPanel(new BorderLayout()); leftpanel.setBackground(Color.WHITE); JButton button = new JButton(editLifeLine); button.setToolTipText("Edit lifeline"); button.setBackground(Color.WHITE); button.setBorderPainted(false);//from w ww . j a va 2 s . c om leftpanel.add(button, BorderLayout.WEST); button.setRolloverEnabled(true); button = new JButton(deleteLifeLine); button.setToolTipText("Delete lifeline"); button.setBackground(Color.WHITE); button.setBorderPainted(false); leftpanel.add(button, BorderLayout.EAST); button.setRolloverEnabled(true); //JLabel editlabel = new JLabel("<html><b><u>edit</u></b> </html>"); //leftpanel.add(editlabel, BorderLayout.WEST); //JLabel deletelabel = new JLabel("<html><b><u>delete</u></b></html>"); //leftpanel.add(deletelabel, BorderLayout.EAST); buttonPanel.add(leftpanel, BorderLayout.EAST); this.add(buttonPanel, BorderLayout.SOUTH); }