turt2live

Untitled

Sep 5th, 2012
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.64 KB | None | 0 0
  1. import java.awt.Font;
  2.  
  3. import javax.swing.JFrame;
  4. import javax.swing.JLabel;
  5. import javax.swing.JPanel;
  6.  
  7. public class JamesExample{
  8.  
  9.     public static void main(String[] args){
  10.         new JamesExample();
  11.     }
  12.    
  13.     public JamesExample(){
  14.         JFrame frame = new JFrame("JamesExample");
  15.         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  16.         frame.setSize(400,400);
  17.         frame.setResizable(false);
  18.         frame.setLocationRelativeTo(null);
  19.         JPanel panel = new JPanel();
  20.         JLabel label = new JLabel("LOL TRAVIS KNOWS ALL");
  21.         label.setFont(new Font("Arial", Font.PLAIN, 16));
  22.         panel.add(label);
  23.         frame.add(panel);
  24.         frame.setVisible(true);
  25.     }
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment