protected void paintComponent(Graphics g) {
		g.drawImage(background, 0, 0, this.width,
				this.height, null);

		switch (pageId) {

		case MAINMENU: {

			resume.draw(g);
			save.draw(g);
			load.draw(g);
			options.draw(g);
			break;

		}
		case OPTIONSMENU: {
			audio.draw(g);
			video.draw(g);
			controls.draw(g);
			break;
		}

		case AUDIOMENU: {
			mute.draw(g);
			break;
		}

		}

		if (pageId != MAINMENU) {
			back.draw(g);
		}

		quit.draw(g);

		if (isClicked) {
			swordOffset += 10;
			if (swordOffset > 100) {
				swordOffset = 0;
				isClicked = false;
				doAction();
			}
		}
	}