@Override
	public void paint(Graphics g) {
		// initialize
		Graphics2D ga = (Graphics2D) g;
		ga.setColor(getBackground());
		ga.clearRect(0, 0, this.getWidth(), this.getHeight());
		ga.fillRect(0, 0, this.getWidth(), this.getHeight());

		if (simulateUntil) {
			URL iconUrl = getClass().getResource("/res/icons/sos_logo.png");
			if (iconUrl != null) {
				Image image = Toolkit.getDefaultToolkit().getImage(iconUrl);
				ga.drawImage(image, this.getWidth() / 2 - 60, 5, this);
			}
		} else {
			// will draw the movableTimeBlocks (because its a swing component and part of this panel)
			super.paint(g);
			
			// draw diagram
			ga.setColor(Color.black);
			timeDiagram.draw(ga);
		}
		
		// draw Timeline
		ga.setPaint(Color.blue);
		ga.drawLine(0, 140, this.getWidth() - 0, 140);

		// Timemarkers
		int mi = 60;
		int totalLength = course.getLecture().getTimeBlocks().getTotalLength();

		if (totalLength < 90)
			mi = 15;
		else if (totalLength < 180)
			mi = 30;
		else if (totalLength < 360)
			mi = 60;
		else if (totalLength < 720)
			mi = 120;
		else if (totalLength < 1440)
			mi = 240;
		else
			mi = 360;
		
		double timemarkers = movableTimeBlocks.getScaleRatio() * mi;
		if (timemarkers > 0.0) {
			SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm");
			Calendar timeCal = Calendar.getInstance();
			timeCal.setTime(course.getLecture().getStart());
			for (int i = 0; i < this.getWidth(); i += (int) timemarkers) {
				String time = timeFormat.format(timeCal.getTime());
				ga.drawLine(i, 135, i, 145);
				ga.drawString(time, i + 2, 139);
				timeCal.add(Calendar.MINUTE, mi);
			}
		}
		
		// TimeMarkerBlock
		timeMarkerBlock.draw(ga, movableTimeBlocks.getScaleRatio());
	}