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.