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 6587893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:58:38+00:00 2026-05-25T16:58:38+00:00

Is there a way in java to use Graphics2D API to paint on screen

  • 0

Is there a way in java to use Graphics2D API to paint on screen of remote java process?
Any API to stream and deserialize painting instructions?

Or I have to use my own “api call” serialization/deserialization mechanism?

  • 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-05-25T16:58:39+00:00Added an answer on May 25, 2026 at 4:58 pm

    That really depends on the kind of media you’re dealing with. If you’re playing video, the codec you’re using might have be APIs to do this, but you’ll need to search around to find out. Graphics2D is really meant for more primitive painting operations, such as drawing shapes, rendering text, and copying image data from place to place.

    If you’re writing your own streaming algorithm, then it could be as simple as defining a PaintEvent class that does what you need. The idea of the PaintEvent class would be that it contains instructions of what to do. For example, if you draw a circle with radio 50 on the remote system, then rather than transmit the pixel data over the network, it’s much more efficient to transmit a message that basically says, “draw a circle with radius 50” across the network, and have the client render it on their side.

    A PaintEvent class, I would think, would look something like this:

    public class PaintEvent {
      public static final int OPER_DRAW_CIRCLE = 0;
      public static final int OPER_DRAW_RECT   = 1;
      public static final int OPER_DRAW_TEXT   = 2;
      ...etc...
    
      int paintOperationID;
      int[] paintDetails;           // where 'paintDetails' contains data such as a circle's radius, a rectangle's dimensions, the (x, y) location where to render text, etc.
      java.awt.Color renderColor;
      String text;
    
      public PaintEvent(int paintOperationID, int[] paintDetails, Color renderColor, String text) {
         ...
      }
    
    }
    

    So, depending on what the paintOperationID is, it would treat the data in paintDetails differently. And unless it’s a OPER_DRAW_TEXT operation, the text field would just be ignored.

    This is one way to do it, anyway. Then you just design a communications protocol around this, to get the data from one place to another.

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

Sidebar

Related Questions

Is there any tricky way to use Java reserved words as variable, method, class,
We can't use java.text.SimpleDateFormat, so is there any way to create date object from
Are there any way to do so? I prefer to use VB.NET or Java
Is there any way in Java to use a special delimiter at the start
Is there an easy way to use DirectX in Java? In particular, DirectX's video
Is there any way (in Java Servlet) to determine whether a HTTP POST or
Is there a way in Java to use unsigned numbers like in (My)SQL? For
Is there a way I can use Java (or Groovy) to change my desktop
is there a way to use java to detect which apps are running in
In c# I use namespaces in java I use packages. Is there a way

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.