Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7739781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:36:27+00:00 2026-06-01T08:36:27+00:00

I am building a whiteboard, which would have a server(teacher) and clients(students). Teacher would

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T08:36:29+00:00Added an answer on June 1, 2026 at 8:36 am
    1. Use a JComponent unless you need to add other components, then use a JPanel.
    2. Send the drawing objects rather than an image. It is less bandwidth than pushing the image. Also implement the protocol to allow the ‘adding or deleting’ of drawn elements. That way you only need to send the latest object(s) to each client. This approach also has the added benefit of being more use to the end-user (student). You might add functionality later to allow the student to adjust/add/delete the elements in the drawing.

    Update

    if I draw a line on teacher’s side, the same should happen to the child’s screen, live, so there is a feeling of realtime drawing..

    Then you definitely want to go the least bandwidth intensive route possible. That will be the bottleneck.

    ..have a JFrame, onto which i have 2 JPanels, 1 for drawing, 1 for buttons.

    In that case, make the drawing component a JComponent & stay with a JPanel (or a JToolBar) for the controls.

    ..what would be that “least bandwidth intensive route possible”?

    In order of bandwidth and ignoring corner cases, they would decrease in approximately this order:

    1. Sending full-screen image:
      1. High quality JPEG
      2. PNG.
      3. High compression JPEG
    2. Sending part-screen image:
      1. High quality JPEG
      2. PNG.
      3. High compression JPEG
    3. Dealing with the drawing elements directly, by sending:
      1. The entire list of drawn objects each update
      2. The current modifications, additions, deletions of drawn elements, relying on the client to hold a model and adjust it as needed.

    In case there is any confusion, I recommend option 3.2.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Building an inventory system. I have lots of products and each product has three
Building my first SL MVVM application (Silverlight4 RC) and have some issues i don't
Building an iPhone OS application that will allow users to anonymously post information to
Building an Android application using Google's GCM service. I have implemented the onRegistered method
Building a website using a PHP based Ecommerce product Magento. The problem I have
building a site which has content for each section. urls range from; /work/ /work/print/
Building an iPad app. I have a button on my main view that I
Building a file open dialog replacement. Much of it works now, but I would
Building off Does Perl have an enumeration type? , how can I perform dynamic
Building a simple image slider/gallery. I have some simple replace code, nothing fancy. <script>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.