Distributed Draw

This program lets you draw lines, ovals, text, and render colored circles.

It also supports a few options such as color for lines and fill mode for circles. Not all the options have been implemented.

The source is here.

To connect multiple drawing applets together, things get a little tricky because of the Java security model. An applet can't listen on random sockets, but a stand-alone application can. So I've made a stand-alone application to do the listening and tie the servers together. Get the chatServer stand-alone application, compile it, and run it with "java chatServer". This application listens on port 4321 for incoming connections. When it receives data from a connection, it echoes it to the other connections. (If multiple people do "telnet name_of_host 4321" to it, you'll have a mini chat program, since you can type stuff to each other.)

Now, what you do is have all the draw programs connect to "chatServer"; each one sends drawing operations to the chatServer and the others all receive these operations. To link up, type the hostname in the "connection" window in the draw window and hit return.

Note: an applet running with appletviewer can connect to any host, but an applet running under Netscape can only connect to the same host that is providing the applet. I.e., if you're loading this page locally and it says "//localhost/...", you have to specify "localhost" as the hostname. If you're getting the pages off foo.bar.edu, you have to run chatServer on foo.bar.edu and specify foo.bar.edu for the hostname.