public void paintComponent(Graphics g) {
		Graphics2D g2D = (Graphics2D) g;
		g2D.setPaint(new GradientPaint(windowDimension.width / 2, 0,
				Color.LIGHT_GRAY, windowDimension.width / 2,
				GameModel.GROUND_LEVEL + yOffset, Color.CYAN));
		g2D.fillRect(0, yOffset, windowDimension.width, GameModel.GROUND_LEVEL);
		g.setColor(DEFAULT_GROUND);
		g.fillRect(0, yOffset + GameModel.GROUND_LEVEL, windowDimension.width, Configurables.BOTTOM);
		model.getShop().paint(g);
		if(model.HAS_PORTAL) model.getPortal().paintOutside(g);
		g.setColor(Color.LIGHT_GRAY);
		for(Rectangle rect:model.getHoles())
			if(isYCoordInsideWindow(rect.y))
				g.fillRect(rect.x, rect.y + yOffset, GameModel.getUnit(), GameModel.getUnit());
		Robot.paint(g, model.getRobotLocation(), GameModel.getSquareUnit(),
				model.getRobot().isDead());
		g.setColor(Color.BLACK);
		for(Rectangle rect:model.getRocks())
			if(isYCoordInsideWindow(rect.y))
				g.fillRect(rect.x, rect.y + yOffset, GameModel.getUnit(), GameModel.getUnit());
		for(Element elem:model.getElements()) {
			if(isYCoordInsideWindow(elem.getLocation().y)) {
				elem.paint(g, yOffset);
			}
		}
		flyups.paint(g, yOffset);
		if(model.getRobot().isDead() && model.getRobot().getReserves() <= 0) {
			drawGameOverMessage(g);
		} else if(model.isLocked()) {
			// Black overlay
			g.setColor(new Color(0, 0, 0, 128));
			g.fillRect(0, 0, this.getWidth(), this.getHeight());
			if(model.getPortal().isVisible())
				model.getPortal().paintWindow(g);
			CheatManager.getInstance().paint(g);
		}
		if(!model.FIRST_STEP) {
			drawPreFirstStepMessage(g);
		}
		drawHUD(g);
	}