public QuestionPanel getQuestionPanel(){
		if(mediaPanel.hasFinished()) createMedia();
		// Check which type of question we have
		if(type.equals("plain")){
			// Create Panel without multiple choice options
			HashMap<String,String> text = new HashMap<String,String>();
			text.put("frage",title);
			questionPanel = new QuestionPanel(text, mediaPanel, fontsize);
		}else if(type.equals("mchoice")){
			// Create a Panel with multiple choice answers
			String[] split = answers.split(";");
			MultipleChoicePanel panel = new MultipleChoicePanel(split, mcfont);

			// Create text HashMap
			HashMap<String,String> text = new HashMap<String,String>();
			text.put("frage",title);
			questionPanel = new QuestionPanel(text, mediaPanel, panel, fontsize);
		}else if(type.equals("mchoice-img") || type.equals("mchoice_img")){
			// Create a Panel with multiple choice answers as images
			String[] split = answers.split(";");
			JLabel[] labels = new JLabel[4];
			BufferedImage bufferedImage;
			Image image;
			for(int i = 0; i < labels.length; i++){
				prefHeight = Math.max(PREF_HEIGHT, mcfont);
				try {
					bufferedImage = ImageIO.read(new File(split[i]));
					if(bufferedImage.getHeight() > prefHeight){
						image = bufferedImage.getScaledInstance(bufferedImage.getWidth()*prefHeight/bufferedImage.getHeight(), prefHeight, BufferedImage.SCALE_SMOOTH);
					}else{
						image = bufferedImage;
					}
				} catch (IOException e) {
			
					bufferedImage = null;
					image = null;
					e.printStackTrace();
					System.out.println("Image path: " + split[i]);
				}
				labels[i] = new JLabel(new ImageIcon(image));
			}

			MultipleChoicePanel panel = new MultipleChoicePanel(labels, mcfont);

			// Create text HashMap
			HashMap<String,String> text = new HashMap<String,String>();
			text.put("frage",title);
			questionPanel = new QuestionPanel(text, mediaPanel, panel, fontsize);
		}else if(type.equals("list")){
			HashMap<String,String> text = new HashMap<String,String>();
			text.put("frage",title);
			String[] answerArray = answers.split(";");
			System.out.println("Create question list");
			questionPanel = new QuestionPanel(text, answerArray, fontsize);
		}else{
			System.out.println("failed to read file");
			System.exit(0);
		}

		return questionPanel;
	}