パーソナルツール
現在の場所: ホーム SwingとSWT チュートリアル 入門編 - JFrame と Shell - SampleJFrame.java
文書操作

SampleJFrame.java

作成者 fujisaki 最終変更日時 2008年11月23日 22時00分

Click here to get the file

サイズ 1 kB - File type text/x-java

ファイルのコンテンツ

import javax.swing.JFrame;

public class SampleJFrame {
    public static void main(String[] args) {
	// フレーム生成
	JFrame frame = new JFrame();
	

	// 閉じるボタンの動作
	frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

	// フレームのサイズ
	frame.setSize(200, 150);

	// フレームのタイトル
	frame.setTitle("フレーム");

	// フレーム表示
	frame.setVisible(true);
    }
}