List of usage examples for javax.swing JLabel setForeground
@BeanProperty(preferred = true, visualUpdate = true, description = "The foreground color of the component.") public void setForeground(Color fg)
From source file:Main.java
public static void main(String[] args) { JLabel label = new JLabel("First Name"); label.setForeground(Color.orange); JFrame frame = new JFrame(); frame.add(label);/*from w w w. jav a 2 s .com*/ frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setBounds(20, 20, 500, 500); frame.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { JLabel label = new JLabel("First Name"); label.setForeground(Color.ORANGE); JFrame frame = new JFrame(); frame.add(label);/* ww w. j a v a 2 s .c o m*/ frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setBounds(20, 20, 500, 500); frame.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { JLabel label = new JLabel("First Name"); label.setForeground(Color.BLUE); JFrame frame = new JFrame(); frame.add(label);//from w ww. j av a 2s .c om frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setBounds(20, 20, 500, 500); frame.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { JLabel label = new JLabel("First Name"); label.setForeground(Color.MAGENTA); JFrame frame = new JFrame(); frame.add(label);/*from w w w .ja v a 2 s . co m*/ frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setBounds(20, 20, 500, 500); frame.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { JLabel label = new JLabel("First Name"); label.setForeground(Color.darkGray); JFrame frame = new JFrame(); frame.add(label);// w w w .j a v a 2 s . co m frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setBounds(20, 20, 500, 500); frame.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { JLabel label = new JLabel("First Name"); label.setForeground(Color.GREEN); JFrame frame = new JFrame(); frame.add(label);// w w w . j av a 2 s. c o m frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setBounds(20, 20, 500, 500); frame.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { Color myColor = new Color(0XFFFFFFFF, true); JLabel label = new JLabel("First Name"); label.setForeground(myColor); JFrame frame = new JFrame(); frame.add(label);//ww w . ja v a2 s . c o m frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setBounds(20, 20, 500, 500); frame.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { Color myColor = Color.RED; JLabel label = new JLabel("First Name"); label.setForeground(myColor.darker()); JFrame frame = new JFrame(); frame.add(label);//from w w w . j a va 2 s.co m frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setBounds(20, 20, 500, 500); frame.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { Color myColor = new Color(0XFFFFFF); JLabel label = new JLabel("First Name"); label.setForeground(myColor); JFrame frame = new JFrame(); frame.add(label);//from w ww. j a va2s .c om frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setBounds(20, 20, 500, 500); frame.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { Color myBlack = new Color(0, 0, 0, 120); // Color black JLabel label = new JLabel("First Name"); label.setForeground(myBlack); JFrame frame = new JFrame(); frame.add(label);/*from w ww. j a v a 2 s .co m*/ frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setBounds(20, 20, 500, 500); frame.setVisible(true); }