1 import java.awt.BorderLayout;
\r
2 import java.awt.Font;
\r
4 import javax.swing.JFrame;
\r
5 import javax.swing.JLabel;
\r
8 public class HelloWorldFrame{
\r
9 private String message = "Hello World";
\r
10 private String fontName = "Lucida Regular";
\r
12 public HelloWorldFrame(){
\r
13 JFrame frame = new JFrame();
\r
14 JLabel label = new JLabel(message);
\r
15 label.setFont(new Font(fontName, Font.BOLD, 72));
\r
16 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
\r
17 frame.getContentPane().add(label, BorderLayout.CENTER);
\r
19 frame.setVisible(true);
\r
22 public static void main(String[] args){
\r
23 new HelloWorldFrame();
\r