import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import java.awt.Container;
import java.awt.BorderLayout;
class game1215 extends JFrame{
String str;
int a;
public static void main(String args[]){
game1215 frame = new game1215("タイトル");
frame.setVisible(true);
}
game1215(String title){
setTitle(title);
setBounds(0, 0, 500, 500);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel p = new JPanel();
a=50;
str=Integer.toString(a);
JTextArea area1 = new JTextArea(str);
JTextArea area2 = new JTextArea(str, 5, 20);
JTextArea area3 = new JTextArea(2, 3);
area3.setText(str);
p.add(area1);
p.add(area2);
p.add(area3);
Container contentPane = getContentPane();
contentPane.add(p, BorderLayout.CENTER);
}
}
最終更新:2011年03月21日 08:20