private void initialize() {
		setUserPreferences(new UserPreferences());
		try {
			UIManager.setLookAndFeel(getUserPreferences().getLookAndFeel());
		} catch (Exception e) {
			e.printStackTrace();
		}
		setController(new Controller(this, getUserPreferences()));

		setFrame(new JFrame());
		setMainPanel(new MainPanel(getUserPreferences()));
		if (getUserPreferences().getHeight() != 0
				&& getUserPreferences().getWidth() != 0) {
			getFrame().setSize(getUserPreferences().getHeight(),
					getUserPreferences().getWidth());
		} else {
			Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
			getFrame().setSize((int) ((0.75) * d.width),
					(int) ((0.75) * d.height));
		}
		if (getUserPreferences().isMaximazed())
			getFrame().setExtendedState(JFrame.MAXIMIZED_BOTH);

		getFrame().setLocationRelativeTo(null);
		getFrame().setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
		getFrame().addWindowListener(new WindowAdapter() {
			public void windowClosing(java.awt.event.WindowEvent e) {
				getUserPreferences().setMaximazed(
						getFrame().getExtendedState() == Frame.MAXIMIZED_BOTH);
				try {
					getUserPreferences().savePreferences();
				} catch (Exception e1) {
					e1.printStackTrace();
				}
				getController().exit();
			}
		});
		;
		getFrame().setTitle("KS Boolean Expression");
		getFrame().setIconImage(programIcon);
		getFrame().getContentPane().setLayout(new BorderLayout(0, 0));

		createActions();
		createMenuActions(getUserPreferences(), getController());
		createPopupMenu();

		panel = new JPanel();
		getFrame().getContentPane().add(panel, BorderLayout.CENTER);
		panel.setLayout(new BorderLayout(0, 0));
		setTabbedPane(new JTabbedPane(JTabbedPane.TOP));
		addTab(true);
		mainPanel.getTextField().setFont(
				new java.awt.Font("Calibri", java.awt.Font.ITALIC, 12));
		mainPanel.getTextField().setText(
				Tools.getLocalizedString("EXAMPLE")
						+ " (ABCD+ABC*!D)|(B*!C*D+A/E)");
		mainPanel.getTextField().addMouseListener(new MouseAdapter() {
			public void mouseClicked(MouseEvent e) {
				mainPanel.getTextField().setText("");
				mainPanel.getTextField().setFont(
						new java.awt.Font("Calibri", java.awt.Font.PLAIN, 12));
				mainPanel.getTextField().removeMouseListener(this);

			}
		});
		mainPanel.getTextField().setComponentPopupMenu(popupMenu);
		mainPanel.getTextField().addMouseListener(new MouseListener() {

			@Override
			public void mouseClicked(MouseEvent arg0) {
			}

			public void mouseEntered(MouseEvent event) {
			}

			public void mouseExited(MouseEvent event) {
			}

			public void mousePressed(MouseEvent event) {
			}

			public void mouseReleased(MouseEvent event) {
				if (event.isPopupTrigger())
					popupMenu.show(event.getComponent(), event.getX(),
							event.getY());
			}

		});

		panel.add(getTabbedPane(), BorderLayout.CENTER);
		panel.add(createToolBar(), BorderLayout.NORTH);

		JMenuBar menuBar = createMenuBar(getUserPreferences(), getController());
		getFrame().getContentPane().add(menuBar, BorderLayout.NORTH);
		JMenuBar homeMenuBar = createMenuBar(getUserPreferences(),
				getController());
		getFrame().add(homeMenuBar, BorderLayout.NORTH);
		getFrame().setVisible(true);
	}