OSDN Git Service

Spiという名前をすべてServiceに変更した.
[stigmata/stigmata.git] / src / test / resources / resources / HelloWorldFrame.java
1 import java.awt.BorderLayout;\r
2 import java.awt.Font;\r
3 \r
4 import javax.swing.JFrame;\r
5 import javax.swing.JLabel;\r
6 \r
7 \r
8 public class HelloWorldFrame{\r
9     private String message = "Hello World";\r
10     private String fontName = "Lucida Regular";\r
11 \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
18         frame.pack();\r
19         frame.setVisible(true);\r
20     }\r
21 \r
22     public static void main(String[] args){\r
23         new HelloWorldFrame();\r
24     }\r
25 }