Witam wszystkich, chciałbym aby ktoś mnie naprowadził w jaki sposób taki oto skrypcik zastosować do aplikacji klient-serwer:

// paintBrush in Java
import java.awt.;
import java.applet.
;
import java.awt.event.*;
public class paintbrush extends Applet implements MouseListener, MouseMotionListener
{
private Point start, end;
public void init()
{
setBackground(new Color(255, 204, 0));
setForeground(new Color(51, 153, 204));
// Add the Event Listeners
addMouseListener(this);
addMouseMotionListener(this);
}
// Capture the mousePressed event
public void mousePressed(MouseEvent e)
{
start = new Point(e.getX(), e.getY());
}
// Define the other events for MouseListener
public void mouseClicked(MouseEvent e) {}
public void mouseEntered(MouseEvent e) {}
public void mouseExited(MouseEvent e) {}
public void mouseReleased(MouseEvent e) {}

// Capture the mouseDrag event
 public void mouseDragged(MouseEvent e)
{
    // Get the current state of the graphics
    Graphics g = getGraphics();
    
    end = new Point(e.getX(), e.getY());
    g.drawLine(start.x, start.y, end.x, end.y);
    start = end;
}
// Define the other events for MouseMotionListener
public void mouseMoved(MouseEvent e) {}

}

Skrypcik tworzy okienko w którym możemy sobie rysować myszką różne kształty. Chodzi mi o to aby ktoś mi powiedział co muszę zrobić aby jednym komputerze rysować a na drugim ktoś widział te rysowanie:) Za wszelkie rady bardzo dziękuje.