public void addMenu(JFrame frame) {
		JMenuBar bar = new JMenuBar();
		JMenu menu;
		JMenuItem item;
		menu = new JMenu("File");
		item = new JMenuItem("Garbage collect");
		item.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent ev) {
				System.gc();
				System.runFinalization();
			}
		});
		menu.add(item);
		item = new JMenuItem("Exit");
		item.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent ev) {
				System.exit(0);
			}
		});
		menu.add(item);
		bar.add(menu);
		menu = new JMenu("Options");
		final JCheckBoxMenuItem hierItem = new JCheckBoxMenuItem(
				"Class hierarchy", hierarchyTree);
		hierItem.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent ev) {
				hierarchyTree = hierItem.isSelected();
				if (hierarchyTree && hierModel == null) {
					hierModel = new HierarchyTreeModel(Main.this, progressBar);
					reselect();
				}
				classTree.setModel(hierarchyTree ? (TreeModel) hierModel
						: packModel);
				if (lastClassName != null) {
					TreePath lastPath = (hierarchyTree ? hierModel
							.getPath(lastClassName) : packModel
							.getPath(lastClassName));
					classTree.setSelectionPath(lastPath);
					classTree.scrollPathToVisible(lastPath);
				}
			}
		});
		menu.add(hierItem);
		menu.add(new JSeparator());
		item = new JMenuItem("Set classpath...");
		item.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent ev) {

				String newClassPath = (String) JOptionPane.showInputDialog(
						null, "New classpath:", null,
						JOptionPane.QUESTION_MESSAGE, null, null,
						currentClassPath);
				if (newClassPath != null
						&& !newClassPath.equals(currentClassPath))
					setClassPath(newClassPath);
			}
		});
		menu.add(item);
		item = new JMenuItem("Reload classpath");
		item.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent ev) {
				setClassPath(currentClassPath);
			}
		});
		menu.add(item);
		bar.add(menu);
		frame.setJMenuBar(bar);
	}