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[] argv) { String COPYRIGHT = "\u00a9"; JLabel a = new JLabel(COPYRIGHT); }
From source file:Main.java
public static void main(String[] args) { JLabel label = new JLabel("Username :"); JOptionPane.showMessageDialog(null, label); }
From source file:Main.java
public static void main(String[] args) { JLabel label = new JLabel("java2s.com"); label.setEnabled(false);/* ww w . jav a2 s . co m*/ JOptionPane.showMessageDialog(null, label); }
From source file:Main.java
public static void main(String[] args) { JLabel label = new JLabel( "\u0414\u043E\u0431\u0440" + "\u043E\u0020\u043F\u043E\u0436\u0430\u043B\u043E\u0432" + "\u0430\u0422\u044A\u0020\u0432\u0020Unicode\u0021"); label.setToolTipText("This is Russian"); JOptionPane.showMessageDialog(null, label); }
From source file:Main.java
public static void main(String[] args) throws Exception { JLabel label = new JLabel("<html><b><font size=+2>" + "<center>Hello!<br><i>Press me now!</html>"); JOptionPane.showMessageDialog(null, label); }
From source file:Main.java
public static void main(String[] args) { JLabel label = new JLabel("First Name"); label.setForeground(Color.PINK); JFrame frame = new JFrame(); frame.add(label);/*from ww w . j a v 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.CYAN); JFrame frame = new JFrame(); frame.add(label);/*from w w w . j a va 2s .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.pink); JFrame frame = new JFrame(); frame.add(label);// w w w. j a va 2s .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.cyan); JFrame frame = new JFrame(); frame.add(label);// ww 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.gray); JFrame frame = new JFrame(); frame.add(label);//w w w. j a va 2 s . c o m frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setBounds(20, 20, 500, 500); frame.setVisible(true); }