Commit 2daef90e authored by 9731087's avatar 9731087

first phase

parent 6b792e98
......@@ -7,6 +7,7 @@ public class ChatArea extends JTextArea {
super(ROWS, COLUMNS);
this.setEditable(false);
this.setLineWrap(true);
setVisible(true);
}
public void addMessage(String username, String message) {
......
......@@ -17,6 +17,7 @@ public class ChatRoomGUI extends JFrame {
this.setVisible(true);
ChatArea chatBox = new ChatArea();
this.add(new JScrollPane(chatBox), BorderLayout.CENTER);
chatBox.addMessage(" Ostad", " Hello!");
MessageArea messageArea = new MessageArea();
this.add(messageArea, BorderLayout.SOUTH);
this.setVisible(true);
......@@ -25,6 +26,7 @@ public class ChatRoomGUI extends JFrame {
participantsArea.addNewParticipant(" Amirmehdy");
participantsArea.addNewParticipant(" Abtin");
participantsArea.removeParticipant(" Amirmehdy");
participantsArea.addNewParticipant(" Ostad");
this.setVisible(true);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment