public TruthTablePanel(final Controller controller) {
		super(controller.program.getFrame());
		setBounds(100, 100, 450, 465);
		this.setVisible(true);
		this.setIconImage(Program.programIcon);
		this.setTitle(Tools.getLocalizedString("TRUTH_TABLE.ShortDescription"));
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		contentPanel.setLayout(new BorderLayout(0, 0));
		JPanel panel = new JPanel();
		FlowLayout flowLayout = (FlowLayout) panel.getLayout();
		flowLayout.setAlignment(FlowLayout.RIGHT);
		contentPanel.add(panel, BorderLayout.NORTH);
		JLabel lblNombreDeVarib = new JLabel(
				Tools.getLocalizedString("NUMBER_OF_VARIABLES"));
		lblNombreDeVarib.setFont(UIManager.getFont("OptionPane.font"));
		panel.add(lblNombreDeVarib);
		spinner.addChangeListener(new ChangeListener() {
			public void stateChanged(ChangeEvent arg0) {
				updateTable();
			}
		});
		spinner.setModel(new SpinnerNumberModel(4, 2, 8, 1));
		panel.add(spinner);
		this.table = createTable();
		Integer val = (Integer) spinner.getValue();
		val = val.intValue();
		for (int j = 0; j < val + 2; j++)
			table.getColumnModel().getColumn(j).setMaxWidth(40);

		this.scrollPane = new JScrollPane(this.table);
		contentPanel.add(scrollPane, BorderLayout.CENTER);
		this.contentPanel.add(scrollPane, FlowLayout.LEFT);
		JPanel buttonPane = new JPanel();
		buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
		getContentPane().add(buttonPane, BorderLayout.SOUTH);
		JButton okButton = new JButton("OK");
		okButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				getValues();
				int i = 0;
				boolean allZero = true;
				while (i < truthTable.length && allZero) {
					if (truthTable[i])
						allZero = false;
					i++;
				}
				if (!allZero)
					controller.solveFromTruthTable(truthTable, getNbrVar(),
							getVarOrder());
				dispose();
			}
		});
		okButton.setActionCommand("OK");
		buttonPane.add(okButton);
		getRootPane().setDefaultButton(okButton);
		JButton cancelButton = new JButton(
				Tools.getLocalizedString("ButtonCancel"));
		cancelButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				dispose();
			}
		});
		cancelButton.setActionCommand("Cancel");
		buttonPane.add(cancelButton);
	}