public void actionPerformed(ActionEvent e) 
	{
		String actioncommand = e.getActionCommand();
		
		if (actioncommand.equals("New Class")) {
			ClassRoom newclassroom = new ClassRoom();
			String name = (String) JOptionPane.showInputDialog(main, "Enter the new Classroom's name");
			if (name != null) {
				File file = new File(this.classesDirectory + System.getProperty("file.separator")  + name);
				if (!file.exists()) {
					file.mkdir();
				} else {
					JOptionPane.showMessageDialog(main, "Classroom already exists! Please use another name");
				}
				newclassroom.save(file);
				main.changeClass(newclassroom);
				this.refresh();
			}
			
		} else if (actioncommand.equals("Delete Class")) {
			/*
			 * Hack to have an empty entry by default.
			 */
			if (!this.classSelection.getSelectedItem().toString().equals("-")) {
				File deletedClass = new File(((ClassRoom) this.classSelection.getSelectedItem()).getSaveDirectory());
				for (File file : deletedClass.listFiles()) {
					file.delete();
				}
				deletedClass.delete();
			}
			this.refresh();
		} else if (actioncommand.equals("Save Class")) {
			this.save();
		}
	}