mainboard.java

来自「用java实现的射击小游戏」· Java 代码 · 共 50 行

JAVA
50
字号
package sweet.game;

import javax.swing.JFrame;

public class Mainboard {

	private JFrame frame;

	/**
	 * Launch the application
	 * @param args
	 */
	public static void main(String args[]) {
		try {
			Mainboard window = new Mainboard();
			window.frame.setVisible(true);
		
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Create the application
	 */
	public Mainboard() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame
	 */
	private void initialize() {
		frame = new JFrame();
		frame.setTitle("小蜜蜂beta(Designed by Sweet)");
		frame.setResizable(false);
		frame.getContentPane().setLayout(null);
		frame.setBounds(100, 100, 500, 375);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		final Start startgame=new Start();
		startgame.setLayout(null);
		startgame.setBounds(0, 0, 500, 345);
		frame.getContentPane().add(startgame);
		frame.addKeyListener(startgame);
		
		
	}

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?