
import javax.swing.*;
import java.awt.*;
class J {
public static void main(String[] arg) {
J5 frame = new J5();
frame.setVisible(true);
}
}
class J5 extends JFrame {
JLabel label;
JButton button;
J5() {
setBounds(0,0,400,300);
setDefaultCloseOperation(EXIT_ON_CLOSE);
label = new JLabel("java100");
button = new JButton("OK");
setLayout(new FlowLayout());//setLayout レイアウトを設定する
add(label);
add(button);
}
}
/*
演習問題
ボタンに表示されている文字列を、Goodに変更してください。
*/