private void newFestivalDialog()
	    {
	    	JTextField fesName = new JTextField();
	    	JTextField day = new JTextField();
	    	JTextField month = new JTextField();
	    	JTextField year = new JTextField();
	    	JTextField startHour = new JTextField();
	    	JTextField startMinute = new JTextField();
	    	JTextField endHour = new JTextField();
	    	JTextField endMinute = new JTextField();
	    	JLabel errorLabel = new JLabel();
	    	
	    	final JComponent[] inputs = new JComponent[] 
	    		{
	    			new JLabel("Name Festival:"),
	    			fesName,
	    			new JLabel("Set date (DD-MM-YYYY):"),
	    			day, month, year,
	    			new JLabel("Set starting time (Hours-Minutes):"),
	    			startHour, startMinute,
	    			new JLabel("Set ending time (Hours-Minutes):"),
	    			endHour, endMinute,
	    			errorLabel
	    		};
	    	// Alle inputvelden waar alleen nummers in mogen
	    	final JTextField[] numberInputs = new JTextField[]
    			{
	    			day, month, year, startHour, startMinute, endHour, endMinute
    			};
	    	
	    	boolean exitAllowed = false;
	    	boolean correctData = true;
	    	
		    while(!exitAllowed)
		    {
		    	// -1 = defaultClose; 2 = Cancel; 0 = OK;
		    	if (JOptionPane.showConfirmDialog(null, inputs, "New Festival", JOptionPane.OK_CANCEL_OPTION) == 0)
		    	{
		    		//correctData aan begin van checkloop op true zetten
			    	correctData = true;
			    	
			    	// empty fields?
			    	for (JComponent i : inputs)
			    	{
			    		if (i.getClass() == JTextField.class)
			    		{
			    			JTextField compTemp = (JTextField) i;
			    			if (compTemp.getText().equals(""))
			    			{
			    				errorLabel.setText("Please fill in every field!");
			    				correctData = false;
				    			break;
			    			}
			    		}
			    	}
			    	
			    	for (JTextField j : numberInputs)
			    	{
				    	if (!checkInp.onlyNumbers(j.getText()))
				    	{
				    		errorLabel.setText("Please use numbers when entering dates or moments.");
				    		correctData = false;
				    		break;
				    	}
				    }
			    	
			    	// Check leading zero's
			    	for (JTextField j : numberInputs)
			    	{
				    	if (checkInp.isFirstCharZero(j.getText()))
				    	{
				    		errorLabel.setText("Please refrain from using leading zero's.");
				    		correctData = false;
				    		break;
				    	}
				    }
			    	
			    	// Check timevalues
			    	if (correctData)
			    	{
			    		if (!checkInp.isMinuteSecondValue(startMinute.getText()) ||
			    			!checkInp.isMinuteSecondValue(endMinute.getText()) ||
			    			!checkInp.isHourValue(startHour.getText()) ||
			    			!checkInp.isHourValue(endHour.getText()) ||
			    			!checkInp.isDay(day.getText()) ||
			    			!checkInp.isMonth(month.getText()) ||
			    			!checkInp.isYear(year.getText()))
			    		{
			    			errorLabel.setText("Please use valid values when entering dates or moments");
			    			correctData = false;
			    			System.out.println("WRONG TIMEVALUE: THE WINDOW IS NOT SUPPOSED TO CLOSE ITSELF!!");
				    		//break;
			    		}
			    	}
			    	
			    	//Check if startHour/Minute take place before endHour/endMinute
			    	GregorianCalendar startDate = new GregorianCalendar(2000, 12, 12, 
			    			Integer.parseInt(startHour.getText()),
			    			Integer.parseInt(startMinute.getText()));
			    	
			    	GregorianCalendar endDate = new GregorianCalendar(2000, 12, 12, 
							Integer.parseInt(endHour.getText()),
							Integer.parseInt(endMinute.getText()));
			    	
			    	if(startDate.getTimeInMillis() > endDate.getTimeInMillis())
			    	{
			    		errorLabel.setText("The ending time can't be before the starting time of your festival.");
		    			correctData = false;
			    		//break;
			    	}
			    	
			    	// all data was entered correctly
			    	if (correctData)
			    	{	
			    		io.setNewFestival("default.fest");
			    		enableButtons(buttons);
			    		io.getFestival().setName(fesName.getText());
	    				io.getFestival().setDate(day.getText() + " - " + month.getText() + " - " + year.getText());
	    				io.getFestival().setStartTime(startHour.getText() + ":" + startMinute.getText());
	    				io.getFestival().setEndTime(endHour.getText() + ":" + endMinute.getText());
				    	statusLabel.setText("Success");
				    	exitAllowed = true;
			    	}	
			    }
			    else 
			    {
			    	// close window
			    	exitAllowed = true;
			    	System.out.println("CANCELED");
			    }
		    }
	    }