BicepBuddyApp/src/main/java/Messaging/DMController.java
public void addMessage(JTextArea messageField, Message message) {
		if(message.getSender().contentEquals(UserController.getUser().getId())) {
			//this is us
			messageField.setText(messageField.getText() + "\n\n" + DATE_FORMAT.format(message.getSendDate()) + 
					" " + "You: " + message.getText());
		}
		else {
			messageField.setText(messageField.getText() + "\n\n" + DATE_FORMAT.format(message.getSendDate()) + 
					" " + dm.getPartner().getfName() + " " + dm.getPartner().getlName() + ": " + message.getText());
		}
	}
/**
	 * Adds the message to the JTextField.
	 *
	 * @param messageField the message field
	 * @param message the message
	 */
Adds the message to the JTextField.
Adds the message to the JTextField .
public void addMessage(JTextArea messageField, Message message) {
		if(message.getSender().contentEquals(UserController.getUser().getId())) {
			messageField.setText(messageField.getText() + "\n\n" + DATE_FORMAT.format(message.getSendDate()) + 
					" " + "You: " + message.getText());
		}
		else {
			messageField.setText(messageField.getText() + "\n\n" + DATE_FORMAT.format(message.getSendDate()) + 
					" " + dm.getPartner().getfName() + " " + dm.getPartner().getlName() + ": " + message.getText());
		}
	}
public void addMessage ( JTextArea messageField , Message message ) { if ( message . getSender ( ) . contentEquals ( UserController . getUser ( ) . getId ( ) ) ) { messageField . setText ( messageField . getText ( ) + "\n\n" + DATE_FORMAT . format ( message . getSendDate ( ) ) + " " + "You: " + message . getText ( ) ) ; } else { messageField . setText ( messageField . getText ( ) + "\n\n" + DATE_FORMAT . format ( message . getSendDate ( ) ) + " " + dm . getPartner ( ) . getfName ( ) + " " + dm . getPartner ( ) . getlName ( ) + ": " + message . getText ( ) ) ; } }
Adds the message to the JTextField.
Adds the message to the JTextField .
//this is us