List of usage examples for javax.swing JLabel JLabel
public JLabel(Icon image)
JLabel
instance with the specified image. From source file:Main.java
public static void main(String[] args) { JLabel label = new JLabel("First Name"); label.setForeground(Color.YELLOW); JFrame frame = new JFrame(); frame.add(label);//from w w w .ja v a 2 s . 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.red); JFrame frame = new JFrame(); frame.add(label);/*from w w w . j a va2s .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.LIGHT_GRAY); JFrame frame = new JFrame(); frame.add(label);/*from w ww . j a v 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);/* w ww .j av a2 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.BLACK); JFrame frame = new JFrame(); frame.add(label);// w ww . ja v a 2s. 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.orange); JFrame frame = new JFrame(); frame.add(label);/* w w w. j ava 2s. 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.ORANGE); JFrame frame = new JFrame(); frame.add(label);/* w w w. j a v a 2 s . 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.BLUE); JFrame frame = new JFrame(); frame.add(label);/*from ww w .j a v a2s. 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.MAGENTA); JFrame frame = new JFrame(); frame.add(label);//from w ww . ja v a2s . 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.darkGray); JFrame frame = new JFrame(); frame.add(label);/*from ww w . j a v a 2 s . c om*/ frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setBounds(20, 20, 500, 500); frame.setVisible(true); }