コンストラクタ
JFrame test = new JFrame();
test.setBounds( 10, 10, 300, 200);
視覚設定しないと見えない
test.setVisible(true);
視覚設定しないと見えない
test.setVisible(true);
終了処理
test.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){System.exit(0);}
});
もしくは
test.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
test.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);