public PlanPanel(SimController simController, Courses courses) {
		this.courses = courses;
		Course course = courses.getCurrentCourse();
		Observers.subscribeTimeGUI(simController);
		// get data
		// timeBlocks = new TimeBlocks(course.getLecture().getTimeBlocks());
		
		// init this Panel
		this.setBorder(BorderFactory.createLineBorder(Color.black));
		this.setLayout(new BorderLayout());
		this.addComponentListener(this);
		
		MouseListener ml = new MouseListener() {
			
			@Override
			public void mouseReleased(MouseEvent e) {
			}
			

			@Override
			public void mousePressed(MouseEvent e) {
				if (e.getSource() instanceof JLabel) {
					JLabel label = (JLabel) e.getSource();
					if (label.getText().equals(" " + Messages.getString("BlockType.BREAK"))) {
						paintArea.addNewTimeBlock(BlockType.pause);
						paintArea.repaint();
					} else if (label.getText().equals(" " + Messages.getString("BlockType.EXERCISE"))) {
						paintArea.addNewTimeBlock(BlockType.exercise);
						paintArea.repaint();
					} else if (label.getText().equals(" " + Messages.getString("BlockType.GROUP"))) {
						paintArea.addNewTimeBlock(BlockType.group);
						paintArea.repaint();
					} else if (label.getText().equals(" " + Messages.getString("BlockType.THEORY"))) {
						paintArea.addNewTimeBlock(BlockType.theory);
						paintArea.repaint();
					} else {
						assert false : "Label has another text then expected.";
					}
				}
			}
			
			
			@Override
			public void mouseExited(MouseEvent e) {
			}
			
			
			@Override
			public void mouseEntered(MouseEvent e) {
			}
			
			
			@Override
			public void mouseClicked(MouseEvent e) {
			}
		};

		// create panel
		JPanel lPanel = new JPanel();
		lPanel.setLayout(new BoxLayout(lPanel, BoxLayout.Y_AXIS));
		
		// create labels
		JLabel lBreak = new JLabel(" " + Messages.getString("BlockType.BREAK"));
		JLabel lExercise = new JLabel(" " + Messages.getString("BlockType.EXERCISE"));
		JLabel lGroup = new JLabel(" " + Messages.getString("BlockType.GROUP"));
		JLabel lTheory = new JLabel(" " + Messages.getString("BlockType.THEORY"));
		
		lBreak.setPreferredSize(new Dimension(LABEL_WIDTH, MovableTimeBlocks.BLOCK_HEIGHT));
		lBreak.setVerticalTextPosition(JLabel.BOTTOM);
		lBreak.addMouseListener(ml);
		lExercise.setPreferredSize(new Dimension(LABEL_WIDTH, MovableTimeBlocks.BLOCK_HEIGHT));
		lExercise.setVerticalTextPosition(JLabel.BOTTOM);
		lExercise.addMouseListener(ml);
		lGroup.setPreferredSize(new Dimension(LABEL_WIDTH, MovableTimeBlocks.BLOCK_HEIGHT));
		lGroup.setVerticalTextPosition(JLabel.BOTTOM);
		lGroup.addMouseListener(ml);
		lTheory.setPreferredSize(new Dimension(LABEL_WIDTH, MovableTimeBlocks.BLOCK_HEIGHT));
		lTheory.setVerticalTextPosition(JLabel.BOTTOM);
		lTheory.addMouseListener(ml);
		
		lPanel.add(Box.createVerticalStrut(5));
		lPanel.add(lTheory);
		lPanel.add(lGroup);
		lPanel.add(lExercise);
		lPanel.add(lBreak);
		lPanel.add(Box.createVerticalGlue());
		this.add(lPanel, BorderLayout.WEST);
		
		// create sidePanel
		JPanel sidePanel = new JPanel();
		sidePanel.setLayout(new BoxLayout(sidePanel, BoxLayout.PAGE_AXIS));
		sidePanel.setBorder(BorderFactory.createMatteBorder(0, 1, 0, 0, Color.black));
		this.add(sidePanel, BorderLayout.EAST);
		
		// control panel (play, pause, etc.)
		JPanel controlPanel = new JPanel();
		PlayBtn btnPlay = new PlayBtn();
		LiveBtn btnLive = new LiveBtn();
		btnPlay.addActionListener(simController);
		btnLive.addActionListener(simController);
		Observers.subscribeSimulation(btnPlay);
		Observers.subscribeEditMode(btnPlay);
		Observers.subscribeEditMode(btnLive);
		
		controlPanel.add(btnPlay);
		controlPanel.add(btnLive);
		sidePanel.add(controlPanel);
		
		// spacer (BoxLayout will be told to put any left space here
		sidePanel.add(Box.createVerticalGlue());
		
		// speed controls
		lblSpeed = new JLabel("1x");
		ForwardBtn btnPlus = new ForwardBtn();
		RewindBtn btnMinus = new RewindBtn();
		JPanel speedPanel = new JPanel();
		speedPanel.add(btnMinus);
		speedPanel.add(lblSpeed);
		speedPanel.add(btnPlus);
		sidePanel.add(speedPanel);
		btnPlus.addActionListener(simController);
		btnMinus.addActionListener(simController);
		
		
		// time
		Observers.subscribeTimeBlocksLength(this);

		JLabel lblFrom = new JLabel(Messages.getString("Lecture.FROM"), SwingConstants.LEFT);
		JLabel lblTo = new JLabel(Messages.getString("Lecture.TO"), SwingConstants.LEFT);
		
		txtFrom = new JFormattedTextField(new DefaultFormatterFactory(new DateFormatter(new SimpleDateFormat("HH:mm"))));
		txtFrom.setColumns(5);
		txtTo = new JTextField(5);
		txtTo.setEditable(false);
		txtTo.setToolTipText(Messages.getString("Lecture.TOINFO"));

		txtFrom.addKeyListener(new EnterKeyListener());
		
		txtFrom.setInputVerifier(new InputVerifier() {
			@Override
			public boolean verify(JComponent input) {
				if ((input instanceof JFormattedTextField)) {
					JFormattedTextField in = (JFormattedTextField) input;
					
					Pattern timeP = Pattern.compile("([0-1][0-9]|2[0-3]):[0-5][0-9]");
					Matcher timeM = timeP.matcher(((JFormattedTextField) input).getText());
					// checks if the colon is at the right point
					// if (in.isEditValid() && (((in.getText(1, 1).equals(":") && in.getText().length() == 4)))
					// || (in.getText(2, 1).equals(":") && in.getText().length() == 5)) {
					if (timeM.matches()) {
						in.setFocusLostBehavior(JFormattedTextField.COMMIT);
						in.getText();
						return true;
					}
					in.setFocusLostBehavior(JFormattedTextField.REVERT);
					return false;
				} else
					return false;
			}
			
			
			@Override
			public boolean shouldYieldFocus(JComponent input) {
				if (!verify(input)) {
					logger.debug("Time value is not correct");
					input.setToolTipText(Messages.getString("Lecture.STARTFAIL"));
					input.setForeground(Color.WHITE);
					input.setBackground(Color.RED);
					return false;
				} else {
					logger.debug("Time value is correct");
					input.setToolTipText("");
					input.setForeground(Color.BLACK);
					input.setBackground(Color.WHITE);
					updateStart((String) ((JFormattedTextField) input).getText());
					updateEnd();
					return true;
				}
			}
			
			
		});
		
		lblFrom.setAlignmentX(Component.LEFT_ALIGNMENT);
		lblTo.setAlignmentX(Component.LEFT_ALIGNMENT);
		txtFrom.setAlignmentX(Component.LEFT_ALIGNMENT);
		txtTo.setAlignmentX(Component.LEFT_ALIGNMENT);
		txtFrom.setMaximumSize(new Dimension(40, 0));
		txtTo.setMaximumSize(new Dimension(40, 0));
		JPanel timePanel = new JPanel();
		timePanel.add(lblFrom);
		timePanel.add(txtFrom);
		timePanel.add(lblTo);
		timePanel.add(txtTo);
		sidePanel.add(timePanel);

		// init paintArea and time fields
		updateCurrentCourse(course);

	}