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

fixed notifyUserDrawing exception

parent 0145a574
No related branches found
No related tags found
No related merge requests found
......@@ -50,6 +50,7 @@ public class ChatScreen {
public ChatScreen(Client client)
{
this.client = client;
activeDrawingUserBox = new JTextArea();
yourNameDisplay.setText(client.getUserName());
exitThisRoomButton.addActionListener(actionListener);
sendButton.addActionListener(actionListener);
......
......@@ -142,13 +142,13 @@ public class PaintGUI extends JPanel {
toolbox2.add(textSize);
toolbox2.add(eraserBtn);
toolbox2.add(eraserSizeOptions);
toolbox2.add(clearBtn);
/// File control panel ///
fileControl.add(newBtn);
fileControl.add(openBtn);
fileControl.add(saveBtn);
fileControl.add(saveAsBtn);
fileControl.add(clearBtn);
/// Layout ///
toolbox.add(toolbox1, BorderLayout.NORTH);
......
......@@ -20,8 +20,9 @@ public class DrawingUpdate extends UnicastRemoteObject implements IDrawingUpdate
this.client = client;
}
public void notifyUserIsDrawing(String fromClient){
public boolean notifyUserIsDrawing(String fromClient) throws RemoteException {
client.getApplicationMain().getChatScreen().getActiveDrawingUserBox().append(fromClient);
return true;
}
@Override
......
......@@ -11,5 +11,5 @@ public interface IDrawingUpdate extends Remote, Serializable {
boolean notifyDraggingDrawing(String fromClient, Shape drawing, String mode, Color color, int strokeSize) throws RemoteException;
boolean notifyCanvasClearance(String fromClient) throws RemoteException;
boolean receiveImage(byte[] rawImage) throws RemoteException;
public void notifyUserIsDrawing(String fromClient) throws RemoteException;
boolean notifyUserIsDrawing(String fromClient) throws RemoteException;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment