private void setupToolbars() {
		outerToolBar = new JToolBar();
		innerToolBar = new JToolBar();

		String basepath = "../../";
		/* Map file buttons */
		saveBtn = makeBtn("Save", basepath + "icons/save.gif", "Save map");
		saveMapBtn = makeBtn("SaveMap", basepath + "icons/save.gif", "Save map");
		openBtn = makeBtn("Open...", basepath + "icons/open.gif", "Open map...");
		openMapBtn = makeBtn("OpenMap...", basepath + "icons/open.gif", "Open map...");
		newBtn = makeBtn("New", basepath + "icons/new.gif", "New map");
		clearBtn = makeBtn("Clear", basepath + "icons/clear.gif",
				"Reset map (Delete all tiles)");

		/* Layer buttons. */
		ButtonGroup layerGroup = new ButtonGroup();
		layerButtons = new JToggleButton[Map.LAYERS];
		layerButtons[2] = makeToggleBtn("Layer 3", basepath + "icons/top.gif",
				"Edit the top layer");
		layerButtons[1] = makeToggleBtn("Layer 2", basepath + "icons/mid.gif",
				"Edit the middle layer");
		layerButtons[0] = makeToggleBtn("Layer 1", basepath + "icons/bottom.gif",
				"Edit the bottom layer");
		layerGroup.add(layerButtons[0]);
		layerGroup.add(layerButtons[1]);
		layerGroup.add(layerButtons[2]);

		/* Visual buttons */
		gridBtn = makeToggleBtn("Grid", basepath + "icons/grid.gif", "Show/Hide Grid");
		hideBtn = makeToggleBtn("Hide other layers", basepath + "icons/hideoth.gif",
				"Hide other layers");
		/*
		 * palletteBtn = makeToggleBtn("Colours", "icons/pallette.png",
		 * "Adjust Hue, Saturation, and RGB channels of the tileset");
		 */

		zoomInBtn = makeBtn("Zoom in", basepath + "icons/zoomin.gif", "Zoom in");
		zoomFullBtn = makeBtn("Zoom 100%", basepath + "icons/zoomfull.gif", "Zoom to 100%");
		zoomOutBtn = makeBtn("Zoom out", basepath + "icons/zoomout.gif", "Zoom out");

		/* One-shot map manipulation buttons */
		shiftRightBtn = makeBtn("->", basepath + "icons/shiftRight.gif",
				"Move tiles right");
		shiftLeftBtn = makeBtn("<-", basepath + "icons/shiftLeft.gif", "Move tiles left");
		shiftUpBtn = makeBtn("^", basepath + "icons/shiftUp.gif", "Move tiles up");
		shiftDownBtn = makeBtn("\\/", basepath + "icons/shiftDown.gif", "Move tiles down");
		increaseWidthBtn = makeBtn("<- ->", basepath + "icons/increaseWidth.gif",
				"Increase field width");
		decreaseWidthBtn = makeBtn("-> <-", basepath + "icons/decreaseWidth.gif",
				"Decrease field width");
		increaseHeightBtn = makeBtn("\\/ +", basepath + "icons/increaseHeight.gif",
				"Increase field height");
		decreaseHeightBtn = makeBtn("^^ -", basepath + "icons/decreaseHeight.gif",
				"Decrease field height");

		/* Other map manipulation buttons */
		fillBtn = makeToggleBtn("Flood Fill", basepath + "icons/fill.gif",
				"Flood fill mode");
		undoBtn = makeBtn("Undo", basepath + "icons/undo.gif", "Undo");
		redoBtn = makeBtn("Redo", basepath + "icons/redo.gif", "Redo");

		undoMI.setAccelerator(KeyStroke.getKeyStroke(new Character('Z'),
				Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
		redoMI.setAccelerator(KeyStroke.getKeyStroke(new Character('Y'),
				Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));

		((JPanel) mainFrame.getContentPane()).getInputMap(
				JComponent.WHEN_IN_FOCUSED_WINDOW).put(
				KeyStroke.getKeyStroke(KeyEvent.VK_Z, InputEvent.CTRL_MASK),
				"Undo");
		((JPanel) mainFrame.getContentPane()).getInputMap(
				JComponent.WHEN_IN_FOCUSED_WINDOW).put(
				KeyStroke.getKeyStroke(KeyEvent.VK_Y, InputEvent.CTRL_MASK),
				"Redo");
		((JPanel) mainFrame.getContentPane()).getActionMap().put("Undo",
				new undoAction());
		((JPanel) mainFrame.getContentPane()).getActionMap().put("Redo",
				new redoAction());

		outerToolBar.add(newBtn);
		outerToolBar.add(openBtn);
		outerToolBar.add(saveBtn);
		outerToolBar.add(clearBtn);
		
		outerToolBar.addSeparator();
		outerToolBar.add(openMapBtn);
		outerToolBar.add(saveMapBtn);

		outerToolBar.addSeparator();
		outerToolBar.add(undoBtn);
		outerToolBar.add(redoBtn);
		outerToolBar.addSeparator();
		outerToolBar.add(fillBtn);

		outerToolBar.addSeparator();
		outerToolBar.add(layerButtons[2]);
		outerToolBar.add(layerButtons[1]);
		outerToolBar.add(layerButtons[0]);

		outerToolBar.addSeparator();
		outerToolBar.add(hideBtn);
		outerToolBar.add(gridBtn);

		outerToolBar.addSeparator();
		outerToolBar.add(zoomInBtn);
		outerToolBar.add(zoomFullBtn);
		outerToolBar.add(zoomOutBtn);

		// outerToolBar.addSeparator();
		// outerToolBar.add(palletteBtn);

		/* quick hack */

		if (compactToolbars) {
			innerToolBar = outerToolBar;
			outerToolBar.addSeparator();
		}

		innerToolBar.add(shiftLeftBtn);
		innerToolBar.add(shiftRightBtn);
		innerToolBar.add(shiftUpBtn);
		innerToolBar.add(shiftDownBtn);

		innerToolBar.addSeparator();
		innerToolBar.add(increaseWidthBtn);
		innerToolBar.add(decreaseWidthBtn);
		innerToolBar.add(increaseHeightBtn);
		innerToolBar.add(decreaseHeightBtn);

		innerToolBar.addSeparator();

		gridBtn.setSelected(true);
		layerButtons[0].setSelected(true);
	}