public MainGui() {
		setLayout(new BorderLayout(9, 4));

		Panel optionPanel = new Panel(new GridLayout(4, 5, 4, 4));
		int length = ESARuleSet.basicWordPairs.length;  
		checkBoxs = new JCheckBox[length]; 
		for (int i = 0; i < length; i++) {
			checkBoxs[i] = new JCheckBox(ESARuleSet.basicWordPairs[i].word); 
			optionPanel.add(checkBoxs[i]);
		}

		add(optionPanel, BorderLayout.CENTER);
		
		JButton btn = new JButton("推理"); 
		add(btn, BorderLayout.SOUTH);
		btn.addActionListener(new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				// TODO Auto-generated method stub
				database = new ArrayList<String>(); 
				for (int i = 0; i < checkBoxs.length; i++) {
					if (checkBoxs[i].isSelected()) {
						database.add(ESARuleSet.basicWordPairs[i].key); 
						System.out.print(ESARuleSet.basicWordPairs[i].word + "\t");
					}
				}
				System.out.println();
				System.out.println(database);
				String conclusion = ESARuleSet.ratiocinate(database);
//				String conclusion = ESARuleSet.ratiocinate("fly", "lay_eggs", "fly_well");
				System.out.println(conclusion);
				JOptionPane.showMessageDialog(null, ESARuleSet.database2String(database) + "\n=>" + conclusion, "推理的结果是", JOptionPane.PLAIN_MESSAGE);
			}
		});
	}