private void addFileMenu() {
		JMenuBar jb = this.getJMenuBar();
		if (jb == null)
			jb = new JMenuBar();

		JMenu menu = new JMenu("file");

		JMenuItem newItem = new JMenuItem("new simulation ...");
		saveItem = new JMenuItem("save");
		saveAsItem = new JMenuItem("save as");
		JMenuItem openItem = new JMenuItem("open ...");
		JCheckBox toolBox = new JCheckBox("component tools", true);
		exitItem = new JMenuItem("exit");
		exitItem.addActionListener(this);

		saveItem.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				saveDesign(file);
				saveItem.setEnabled(false);
			}
		});
		saveItem.setEnabled(false);

		newItem.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				setFile(null);
				panel.clear();
				saveItem.setEnabled(false);
			}
		});
		saveAsItem.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				saveDesignToNewFile();
				saveItem.setEnabled(false);
			}
		});
		saveAsItem.setEnabled(false);

		openItem.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				if (saveItem.isEnabled() || saveAsItem.isEnabled()) {
					queryToSave();
				}
				JFileChooser fc = new JFileChooser();

				if (file != null)
					fc.setSelectedFile(file);

				FileNameExtensionFilter filter = new FileNameExtensionFilter(
						"Simu Files", "smu");

				fc.setFileFilter(filter);
				int returnVal = fc.showOpenDialog(null);
				if (returnVal == JFileChooser.APPROVE_OPTION) {
					File fileTmp = fc.getSelectedFile();
					try {
						panel.clear();
						panel.readFrom(fileTmp);
						setFile(fileTmp);
						saveItem.setEnabled(false);
					} catch (Exception e1) {
						JOptionPane.showMessageDialog(null,
								"Error in reading in file\n    "
										+ fileTmp.getName()
										+ "\nError Message:\n    "
										+ e1.getMessage());
					}
				}
			}
		});

		toolBox.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				JCheckBox cb = (JCheckBox) e.getSource();
				componentTB.setVisible(cb.isSelected());
			}
		});

		menu.add(newItem);
		menu.add(openItem);
		menu.add(new JSeparator());
		menu.add(saveItem);
		menu.add(saveAsItem);
		menu.add(new JSeparator());
		menu.add(toolBox);
		menu.add(new JSeparator());
		menu.add(exitItem);
		jb.add(menu);

		this.setJMenuBar(jb);
	}