Right method to build a online whiteboard - JAVA

Posted by Nikhar Sharma on Stack Overflow See other posts from Stack Overflow or by Nikhar Sharma
Published on 2012-04-01T05:00:12Z Indexed on 2012/04/01 5:28 UTC
Read the original article Hit count: 216

Filed under:

I am building a whiteboard, which would have a server(teacher) and clients(students). Teacher would draw something on his side, which will be shown exactly same to the students.

  1. I want to know which component i should use to do the drawing? i am currently drawing on JPanel .
  2. I want the screen of Server gets copied on the clients, so for that what could be the right method to do this?
    • option1: i save the JPanel as image, and send thru socket, and loads it on the screen of client, also it always saves the background image only, not what the user has drawn onto it. OR
    • option2: both server and client JPanel dimensions are same, so i just send the new coordinates drawn everytime thru socket, with some protocol to understand whether it is rubber or pencil..

Any help would be appreciated.

© Stack Overflow or respective owner

Related posts about java