@Override
	public void update(Observable arg0, Object arg1) {
		ModelNotification notificationType = (ModelNotification) arg1;
		
		switch(notificationType) {
			case LIST_OF_PARTICIPANTS_CHANGED: 
				participantsJListModel.clear();
				ArrayList<String> participants = participantList.getParticipantNames();
				for(int k=0; k<participants.size(); ++k) {
					participantsJListModel.addElement(participants.get(k));
				}			
				break;
				
			case MESSAGE_RECEIVED: 
				outputTextArea.setText(chatHistory.getChatText());	
				outputTextArea.setCaretPosition(outputTextArea.getDocument().getLength());			
				break;			
				
			case LANGUAGE_CHANGED:
				refreshLabels();
				outputTextArea.setText(chatHistory.getChatText());	
				outputTextArea.setCaretPosition(outputTextArea.getDocument().getLength());					
				break;
				
			case NAME_CHANGED:
				outputTextArea.setText(chatHistory.getChatText());	
				outputTextArea.setCaretPosition(outputTextArea.getDocument().getLength());	
				break;
				
			case CONNECTION_ESTABLISHED: 
				setInputsEnabled(true);
				fileConnectMenuItem.setVisible(false);
				fileDisconnectMenuItem.setVisible(true);	
				break;
				
			case CONNECTION_ERROR: 
				setInputsEnabled(false);
				JOptionPane.showMessageDialog(this,
						settings.getLanguage().getLabel("connection_error_description"),
					    settings.getLanguage().getLabel("error_title"),
					    JOptionPane.ERROR_MESSAGE);
				
				break;
				
			case ERROR: 
				
				break;							
		}
	}