@Override
	public void actionPerformed(ActionEvent e) {
		if(e.getActionCommand().equals("Save")) { // Saves the current values in an existing notice
			model.edit(view.getNotice(), view.getSubject(), view.getText(), view.getPriority());
			view.actualizeList(model.getSubjects());
			view.revalidate();
			view.repaint();
			view.pack();
		}
		if(e.getActionCommand().equals("New")) { // Adds a new notice or does nothing, if the notice already exists
			model.add(new SSNotice(view.getSubject(), view.getText(), view.getPriority()));
			model.arraying();
			view.actualizeList(model.getSubjects());
			view.init(model.getDate(-1));
			view.revalidate();
			view.repaint();
			view.pack();
		}
		if(e.getActionCommand().equals("Delete")) { // Deletes an existing notice or does nothing, if there is no notice
			model.remove(view.getNotice());
			model.arraying();
			view.actualizeList(model.getSubjects());
			view.init(model.getDate(-1));
			view.revalidate();
			view.repaint();
			view.pack();
		}
		if(e.getActionCommand().equals("Notices")) { // Loads the values from an existing notice
			view.setSubject(model.getSubject(view.getNotice()));
			view.setText(model.getText(view.getNotice()));
			view.setDate(model.getDate(view.getNotice()));
			view.setPriority(model.getPriority(view.getNotice()));
		}
		if(e.getActionCommand().equals("Sorting")) { // Sort based on given mechanism and list again.
			if(view.getSort().equals("Prioritize")) {
				model.sort(new SSNotice());
			}else{
				model.sort(null);
			}
			view.actualizeList(model.getSubjects());
		}
	}