public MainWindow()
	{
		super("简易词法&语法分析器");
		this.setBounds(0, 0, 500, 260);
		this.setVisible(true);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.getContentPane().setLayout(null);
		this.setLocationRelativeTo(null);

		//初始化控件
		buttons.add(btnAnalysisDefault);
		buttons.add(btnAnalysisCustom);
		buttons.add(btnShowSysLable);
		buttons.add(btnShowSource);
		//		buttons.add(btnShowLable);
		buttons.add(btnShowPre);
		buttons.add(btnShowBinary);
		buttons.add(btnGrammaticalAnalysis);
		//		buttons.add(btnShowGAResult);
		//		buttons.add(btnHelp);

		label.setBounds(100, 10, 260, 30);
		label.setText("Easy Lexical Analysis Tool");
		label.setFont(new java.awt.Font("MS Song", Font.BOLD, 20));
		this.getContentPane().add(label);

		labelVersion.setBounds(360, 18, 50, 20);
		labelVersion.setText("v2.0");
		labelVersion.setFont(new java.awt.Font("MS Song", Font.BOLD, 15));
		//		labelVersion.setBackground(Color.RED);
		this.getContentPane().add(labelVersion);

		labelAuthor.setBounds(350, 30, 150, 30);
		labelAuthor.setText("2013.5    by Bottle");
		labelAuthor.setFont(new java.awt.Font("MS Song", Font.ITALIC, 10));
		this.getContentPane().add(labelAuthor);

		btnAnalysisDefault.setBounds(50, 60, 180, 30);
		this.getContentPane().add(btnAnalysisDefault);

		btnAnalysisCustom.setBounds(250, 60, 180, 30);
		this.getContentPane().add(btnAnalysisCustom);

		btnShowSysLable.setBounds(50, 100, 180, 30);
		this.getContentPane().add(btnShowSysLable);

		btnShowSource.setBounds(250, 100, 180, 30);
		this.getContentPane().add(btnShowSource);

		//		btnShowLable.setBounds(50, 100, 180, 30);
		//		this.getContentPane().add(btnShowLable);

		btnShowPre.setBounds(50, 140, 180, 30);
		this.getContentPane().add(btnShowPre);

		btnShowBinary.setBounds(250, 140, 180, 30);
		this.getContentPane().add(btnShowBinary);

		btnGrammaticalAnalysis.setBounds(50, 180, 180, 30);
		this.getContentPane().add(btnGrammaticalAnalysis);

		//		btnShowGAResult.setBounds(250, 180, 180, 30);
		//		this.getContentPane().add(btnShowGAResult);

		//		btnHelp.setBounds(250, 140, 180, 30);
		//		this.getContentPane().add(btnHelp);

		//设置其他按钮不可点击
		for (int i = 3; i < buttons.size(); i++)
		{
			buttons.get(i).setEnabled(false);
		}

		//设置监听
		for (int i = 0; i < buttons.size(); i++)
		{
			buttons.get(i).addActionListener(new MyListener(i));
		}

	}