HomeJavaSwing JFrame

JFrame

インスタンス生成

public class クラス名 extends JFrame{

	public クラス名() {
		super();
	}
	//メイン関数
	public static void main(String[] args) {

		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				クラス名 オブジェクト名 = new クラス名();
				オブジェクト名.setVisible(true);
			}
		});
	}
}

内部パネル設定

this.setContentPane(パネルオブジェクト名);

サイズ設定

this.setSize(横幅, 縦幅);

タイトル削除

this.setUndecorated(true);

フルスクリーン クラス:import java.awt.*;

GraphicsDevice device = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
device.setFullScreenWindow(this);	



ページトップへ

データベース

サーバ

Copyright (C) MadCap. All Rights Reserved.