フレームの追加

class Sampleclass extends JFrame{
 public static void main(String[] args){
//MainFrame型のインスタンスはコンストラクタ上でなく、ここで生成。
Sampleclass frame = new MainFrame();
//フレームの設定
frame.setTitle("タイトル");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setBounds(10, 10, 600, 400);
frame.setVisible(true);
 }
最終更新:2008年02月23日 23:55