Two Laptop Bag
The moose likes Sockets and Internet Protocols and the fly likes java intranet collaborative draw board Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "java intranet collaborative draw board" Watch "java intranet collaborative draw board" New topic

java intranet collaborative draw board

Lucida Romulus

Joined: Mar 19, 2012
Posts: 11

i'll be honest. i'm new to java and i have an assignment that requires me to create a networked canvas (intranet) which 2 users will draw on and both sides will see what each other have drawn on the canvas . its called a collaborative white board in the assignment title.

would someone please kindly teach me or point me to the correct direction i should be going?

i need to code it(for my assignment) and more importantly to understand it(for knowledge's sake).

i've searched online and found a sample or two but they are too complicated for my level....i can't make sense out of it...

this is the code so far that i have. its basically a canvas to draw things on it. (note: the code below contains code taken from the net) (sorry i'm new to java and am learning through trial and error)

help and advice is much appreciated.
Olivier López
Ranch Hand

Joined: Jan 31, 2010
Posts: 32
This code will help you learning how to draw stuff and how to call paint methods, but so far it looks like it will only allow you to draw circles.
If you dont know java it will be an inmense challenge, because you will need to learn how to program sockets to share data between the two persons
on the network, then you will need to learn threads to listen everytime if the other person is drawing.
Also, you will need to create a thread that listens to your mouse, and when you "click" inside the whiteboard it will place a "dot" of color on any
place where you move your mouse while holding the click.

I know that this is not a really accurate answer, but in order to accomplish this you should have some solid java background first.
Don Ho

Joined: Mar 07, 2012
Posts: 9

Hmmm I think you could do AND understand it, if you had enough time to do some tutorials first... (Like more than a week or so)

Seems like you've managed to get the drawing part working, so just keep on playing with it and try things like drawing lines and other stuff.

The next part would be to establish a network connection between two computers. This tutorial is helpful for understanding how to go about doing that.
Lucida Romulus

Joined: Mar 19, 2012
Posts: 11
could someone teach me how to run this? I tried running it but nothing appeared it.

this is the only simple example i could find on the net and i wish to learn from it however i need to determine if it works first before researching the code.

i tried running it but nothing appeared. could someone test it out as if it runs properly please let me know how to run it?
I agree. Here's the link:
subject: java intranet collaborative draw board
It's not a secret anymore!