Skip to content
Snippets Groups Projects
Commit 033d77a7 authored by Hai HoDac's avatar Hai HoDac
Browse files

commit

parent 086699c6
Branches
Tags
No related merge requests found
......@@ -3,117 +3,205 @@
<grid id="27dc6" binding="panel2" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="20" y="20" width="500" height="400"/>
<xy x="20" y="20" width="1200" height="1200"/>
</constraints>
<properties>
<maximumSize width="-1" height="-1"/>
<minimumSize width="-1" height="-1"/>
<preferredSize width="1200" height="700"/>
</properties>
<border type="none"/>
<children>
<grid id="b37e3" binding="othersPanel" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<grid id="b9a73" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="bad73" binding="myAreaPanel" layout-manager="GridLayoutManager" row-count="12" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="120" height="20"/>
</grid>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="7" hsize-policy="1" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none" title="My Area"/>
<children>
<component id="a35da" class="javax.swing.JLabel" binding="managersNameLabel">
<constraints>
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<background color="-6578270"/>
<font size="14" style="1"/>
<text value="Manager's Name:"/>
</properties>
<border type="none"/>
<children>
<component id="b2458" class="javax.swing.JButton" binding="quitButton" default-binding="true">
</component>
<vspacer id="38e19">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
<grid row="10" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
<component id="98bbe" class="javax.swing.JLabel" binding="yourNameLabel">
<constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Quit"/>
<font size="14" style="1"/>
<text value="Your Name:"/>
</properties>
</component>
<hspacer id="3f7a8">
<component id="33d66" class="javax.swing.JLabel" binding="yourNameDisplay">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
</hspacer>
</children>
</grid>
<grid id="b37e3" layout-manager="GridLayoutManager" row-count="4" column-count="4" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<properties>
<text value="Here goes User's Name"/>
</properties>
</component>
<grid id="4212" binding="managersPanel" layout-manager="GridLayoutManager" row-count="4" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
<grid row="6" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<border type="none" title="Manager's Tools"/>
<children>
<hspacer id="1000b">
<component id="b7068" class="javax.swing.JComboBox" binding="userSelectComboBox">
<constraints>
<grid row="2" column="1" row-span="1" col-span="2" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
</hspacer>
<vspacer id="d2a11">
<properties>
<model/>
</properties>
</component>
<vspacer id="aae38">
<constraints>
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
<scrollpane id="55ee">
<component id="be5e9" class="javax.swing.JButton" binding="kickOutButton" default-binding="true">
<constraints>
<grid row="1" column="0" row-span="1" col-span="3" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Kick Out"/>
</properties>
</component>
<component id="1336c" class="javax.swing.JButton" binding="promoteToManagerButton" default-binding="true">
<constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="e8d87" class="javax.swing.JTextArea" binding="chatOutputArea">
<constraints/>
<properties>
<editable value="false"/>
<text value="Promote to Manager"/>
</properties>
</component>
</children>
</scrollpane>
<component id="9e940" class="javax.swing.JButton" binding="send">
</grid>
<component id="51b56" class="javax.swing.JLabel" binding="managersNameDisplay">
<constraints>
<grid row="3" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Send"/>
<text value="Here goes Admin's Name"/>
</properties>
</component>
<component id="f1743" class="javax.swing.JTextArea" binding="chatInputArea">
<vspacer id="e9e96">
<constraints>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="6" anchor="0" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="150" height="50"/>
<grid row="11" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
<component id="deaed" class="javax.swing.JButton" binding="exitThisRoomButton" default-binding="true">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Exit This Room"/>
</properties>
</component>
<component id="bd8ec" class="javax.swing.JButton" binding="quitButton">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Quit Program"/>
</properties>
</component>
</children>
</grid>
<grid id="5d886" binding="chatPanel" layout-manager="GridLayoutManager" row-count="6" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="0" row-span="2" col-span="1" vsize-policy="7" hsize-policy="6" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none" title="Chat Area"/>
<children>
<component id="6a928" class="javax.swing.JLabel">
<constraints>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Your Message"/>
</properties>
</component>
<scrollpane id="5b85e">
<component id="9e940" class="javax.swing.JButton" binding="sendButton">
<constraints>
<grid row="1" column="3" row-span="3" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Send"/>
</properties>
</component>
<scrollpane id="ec60d">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="15b62" class="javax.swing.JTextArea" binding="userListArea">
<component id="c55f3" class="javax.swing.JTextArea" binding="chatDisplayBox">
<constraints/>
<properties/>
<properties>
<editable value="true"/>
<lineWrap value="true"/>
</properties>
</component>
</children>
</scrollpane>
<component id="a35da" class="javax.swing.JLabel">
<component id="2b67f" class="javax.swing.JTextField" binding="chatInputBox">
<constraints>
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
</grid>
</constraints>
<properties/>
</component>
<component id="df8f1" class="javax.swing.JLabel" binding="sendMessageToLabel">
<constraints>
<grid row="0" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Users"/>
<text value="Send Message To:"/>
</properties>
</component>
<component id="cc35d" class="javax.swing.JComboBox" binding="sentMessageToComboBox">
<constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
</component>
</children>
</grid>
<grid id="c0bac" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
</children>
</grid>
<grid id="be22c" binding="drawingPanel" custom-create="true" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="0" row-span="2" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
<grid row="0" column="0" row-span="2" col-span="1" vsize-policy="3" hsize-policy="1" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<border type="none" title="Drawing Area"/>
<children/>
</grid>
</children>
......
......@@ -12,41 +12,70 @@ import java.rmi.RemoteException;
public class ChatScreen {
public JPanel panel2;
private JButton sendButton;
private JPanel drawingPanel;
private JPanel othersPanel;
private JComboBox sentMessageToComboBox;
private JTextArea chatDisplayBox;
private JComboBox userSelectComboBox;
private JButton kickOutButton;
private JButton promoteToManagerButton;
private JTextField chatInputBox;
private JLabel sendMessageToLabel;
private JLabel managersNameLabel;
private JLabel yourNameLabel;
private JLabel yourNameDisplay;
private JLabel managersNameDisplay;
private JPanel myAreaPanel;
private JPanel managersPanel;
private JPanel chatPanel;
private JButton exitThisRoomButton;
private JButton quitButton;
private JButton send;
private JFrame frame;
private Client client;
public JTextArea getChatOutputArea()
public ChatScreen(Client client)
{
return chatOutputArea;
this.client = client;
yourNameDisplay.setText(client.getUserName());
// sentMessageToComboBox.addItem(client.getUserName());
quitButton.addActionListener(actionListener);
sendButton.addActionListener(actionListener);
frame = new JFrame("Application");
frame.setContentPane(panel2);
createUIComponents();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setResizable(false);
frame.setVisible(true);
}
private JTextArea chatOutputArea;
private JTextArea chatInputArea;
public JTextArea getUserListArea() {
return userListArea;
private void createUIComponents() {
drawingPanel = new PaintGUI(client).getGlobal();
}
private JTextArea userListArea;
private JPanel ryanPanel;
private JPanel x;
private JFrame frame;
public JTextArea getChatDisplayBox() {
return chatDisplayBox;
}
private Client client;
public JComboBox getSentMessageToComboBox() {
return sentMessageToComboBox;
}
public void setChatOutput(String message)
{
this.chatOutputArea.setText(message);
public JPanel getDrawingPanel() {
return drawingPanel;
}
ActionListener actionListener = new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
if (e.getSource() == send)
if (e.getSource() == sendButton)
{
String message = chatInputArea.getText();
chatInputArea.setText("");
String message = chatInputBox.getText();
chatInputBox.setText("");
IChatController chatController = client.getChatController();
try
{
......@@ -58,12 +87,12 @@ public class ChatScreen {
ex.printStackTrace();
}
}
else if (e.getSource() == quitButton)
else if (e.getSource() == exitThisRoomButton)
{
IClientController clientController = client.getClientController();
try
{
System.out.println("Quit button pressed");
System.out.println("Exit room button pressed");
clientController.quit(client.getUserName());
System.exit(0);
}
......@@ -75,38 +104,4 @@ public class ChatScreen {
}
};
public ChatScreen(Client client)
{
this.client = client;
quitButton.addActionListener(actionListener);
send.addActionListener(actionListener);
frame = new JFrame("ChatScreen");
frame.setContentPane(panel2);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
// createUIComponents();
}
// private void createUIComponents() {
// ryanPanel = new PaintGUI().getGlobal();
//
// }
// public static void main (String[] args) {
// ChatScreen chatScreen = new ChatScreen();
// chatScreen.go();
// }
// public void go(){
// //joinButton.addActionListener(actionListener);
// frame = new JFrame("App");
// frame.setContentPane(panel2);
// frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// frame.pack();
// frame.setVisible(true);
// }
}
......@@ -27,7 +27,7 @@ public class DrawingArea extends JPanel implements MouseMotionListener, MouseLis
/// Canvas size parameter ///
private final static int AREA_WIDTH = 600;
private final static int AREA_HEIGHT = 500;
private final static int AREA_HEIGHT = 620;
/// Shape to be drawn on the canvas ///
private Client client;
......
......@@ -18,22 +18,64 @@ public class PaintGUI extends JPanel {
JButton clearBtn, newBtn, openBtn, saveBtn, saveAsBtn, closeBtn;
JComboBox colorOptions;
JComboBox shapeOptions;
public DrawingArea getDrawingArea() {
return drawingArea;
}
DrawingArea drawingArea;
Client client;
JPanel global = new JPanel();
JFileChooser fileChooser= new JFileChooser();
JPanel toolbox = new JPanel();
JPanel fileControl = new JPanel();
/// GUI setup ///
public PaintGUI(Client client) {
this.client = client;
/// Main drawing area ///
drawingArea = new DrawingArea(client);
/// Set up main frame and container ///
global.setLayout(new BorderLayout());
/// Set up elements ///
shapeOptions = new JComboBox(shapes);
shapeOptions.addActionListener(actionListener);
colorOptions = new JComboBox(colors);
colorOptions.setSelectedItem("Black");
colorOptions.addActionListener(actionListener);
clearBtn = new JButton("Clear");
clearBtn.addActionListener(actionListener);
newBtn = new JButton("New");
newBtn.addActionListener(actionListener);
openBtn = new JButton("Open");
openBtn.addActionListener(actionListener);
saveBtn = new JButton("Save");
saveBtn.addActionListener(actionListener);
saveAsBtn = new JButton("Save As");
saveAsBtn.addActionListener(actionListener);
closeBtn = new JButton("Close");
closeBtn.addActionListener(actionListener);
/// Toolbox panel ///
toolbox.add(colorOptions);
toolbox.add(shapeOptions);
toolbox.add(clearBtn);
/// File control panel ///
fileControl.add(newBtn);
fileControl.add(openBtn);
fileControl.add(saveBtn);
fileControl.add(saveAsBtn);
fileControl.add(closeBtn);
/// Layout ///
global.add(fileControl, BorderLayout.NORTH);
global.add(drawingArea);
global.add(toolbox, BorderLayout.SOUTH);
}
public JPanel getGlobal() {
return global;
}
JPanel global = new JPanel();
JFileChooser fileChooser= new JFileChooser();
JPanel toolbox = new JPanel();
JPanel fileControl = new JPanel();
ActionListener actionListener = new ActionListener() {
public void actionPerformed(ActionEvent e) {
......@@ -166,66 +208,23 @@ public class PaintGUI extends JPanel {
}
};
/// Main program ///
/// GUI setup ///
public PaintGUI(Client client) {
this.client = client;
/// Main drawing area ///
drawingArea = new DrawingArea(client);
/// Set up main frame and container ///
global.setLayout(new BorderLayout());
/// Set up elements ///
shapeOptions = new JComboBox(shapes);
shapeOptions.addActionListener(actionListener);
colorOptions = new JComboBox(colors);
colorOptions.setSelectedItem("Black");
colorOptions.addActionListener(actionListener);
clearBtn = new JButton("Clear");
clearBtn.addActionListener(actionListener);
newBtn = new JButton("New");
newBtn.addActionListener(actionListener);
openBtn = new JButton("Open");
openBtn.addActionListener(actionListener);
saveBtn = new JButton("Save");
saveBtn.addActionListener(actionListener);
saveAsBtn = new JButton("Save As");
saveAsBtn.addActionListener(actionListener);
closeBtn = new JButton("Close");
closeBtn.addActionListener(actionListener);
/// Toolbox panel ///
toolbox.add(colorOptions);
toolbox.add(shapeOptions);
toolbox.add(clearBtn);
public DrawingArea getDrawingArea() {
return drawingArea;
}
/// File control panel ///
fileControl.add(newBtn);
fileControl.add(openBtn);
fileControl.add(saveBtn);
fileControl.add(saveAsBtn);
fileControl.add(closeBtn);
/// Layout ///
global.add(fileControl, BorderLayout.NORTH);
global.add(drawingArea);
global.add(toolbox, BorderLayout.SOUTH);
}
public void showGUI() {
frame = new JFrame("Shared Whiteboard System");
JFrame.setDefaultLookAndFeelDecorated(true);
frame.setContentPane(global);
frame.setSize(800, 600);
frame.setLocationRelativeTo( null );
frame.setResizable(false);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
// public void showGUI() {
// frame = new JFrame("Shared Whiteboard System");
// JFrame.setDefaultLookAndFeelDecorated(true);
// frame.setContentPane(global);
//
// frame.setSize(800, 600);
// frame.setLocationRelativeTo( null );
// frame.setResizable(false);
// frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// frame.setVisible(true);
// }
}
\ No newline at end of file
......@@ -19,7 +19,7 @@ public class ChatUpdate extends UnicastRemoteObject implements IChatUpdate, Seri
@Override
public boolean notifyChat(String fromClient, String message) throws RemoteException
{
client.getChatScreen().getChatOutputArea().append(fromClient + ": " + message + "\n");
client.getChatScreen().getChatDisplayBox().append(fromClient + ": " + message + "\n");
//client.setReceivedMessage(message);
System.out.println(fromClient + ": " + message);
......@@ -28,13 +28,13 @@ public class ChatUpdate extends UnicastRemoteObject implements IChatUpdate, Seri
@Override
public boolean notifyUserLogin(String fromClient) throws RemoteException {
client.getChatScreen().getChatOutputArea().append(fromClient + " has joined the room.\n");
client.getChatScreen().getChatDisplayBox().append(fromClient + " has joined the room.\n");
return true;
}
@Override
public boolean notifyUserLogout(String fromClient) throws RemoteException {
client.getChatScreen().getChatOutputArea().append(fromClient + " has left the room.\n");
client.getChatScreen().getChatDisplayBox().append(fromClient + " has left the room.\n");
return true;
}
......
......@@ -20,21 +20,19 @@ public class Client
private Registry registryServer;
private IChatController chatController;
private IClientController clientController;
private IDrawingController drawingController;
private ClientUpdate clientUpdate;
private ChatUpdate chatUpdate;
private DrawingUpdate drawingUpdate;
private StartScreen startScreen;
private StartScreen startScreen;
private ChatScreen chatScreen;
private PaintGUI paintGUI;
// private PaintGUI paintGUI;
public PaintGUI getPaintGUI() {
return paintGUI;
}
// public PaintGUI getPaintGUI() {
// return paintGUI;
// }
public ChatScreen getChatScreen()
......@@ -81,7 +79,7 @@ public class Client
this.drawingUpdate = new DrawingUpdate(this);
this.startScreen = new StartScreen(this);
this.chatScreen = new ChatScreen(this);
this.paintGUI = new PaintGUI(this);
// this.paintGUI = new PaintGUI(this);
}
public static void main(String[] args)
......@@ -91,7 +89,7 @@ public class Client
Client client = new Client(args[0]);
client.connect();
// client.startScreen.go();
client.getPaintGUI().showGUI();
// client.getPaintGUI().showGUI();
}
catch (Exception e)
{
......@@ -99,22 +97,6 @@ public class Client
}
}
// public void doSomething()
// {
//// new ChatScreen();
//
// try
// {
// new ChatScreen(this);
// System.out.println("Sleeping...");
// TimeUnit.MINUTES.sleep(5);
// }
// catch(Exception e)
// {
// e.printStackTrace();
// }
// }
public boolean connect()
{
try
......@@ -139,14 +121,4 @@ public class Client
return false;
}
public String getReceivedMessage()
{
return receivedMessage;
}
public void setReceivedMessage(String receivedMessage)
{
this.receivedMessage = receivedMessage;
}
}
\ No newline at end of file
......@@ -19,7 +19,7 @@ public class ClientUpdate extends UnicastRemoteObject implements IClientUpdate,
@Override
public boolean notifyClient(String fromClient, String newUsername) throws RemoteException
{
client.getChatScreen().getUserListArea().setText(newUsername);
client.getChatScreen().getSentMessageToComboBox().addItem(newUsername);
return true;
}
......
......@@ -18,8 +18,9 @@ public class DrawingUpdate extends UnicastRemoteObject implements IDrawingUpdate
@Override
public boolean notifyDrawing(String fromClient, Shape drawing) throws RemoteException {
client.getPaintGUI().getDrawingArea().setDrawing(drawing);
client.getPaintGUI().getDrawingArea().repaint();
// client.getPaintGUI().getDrawingArea().setDrawing(drawing);
// client.getPaintGUI().getDrawingArea().repaint();
client.getChatScreen().getDrawingPanel().getRootPane();
return false;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment