Re: paint program

From: Paul Lutus (nospam_at_nosite.zzz)
Date: 09/22/04


Date: Wed, 22 Sep 2004 11:00:42 -0700

John Davison wrote:

/ ...

> I'm guessing that Java probably doesn't keep track of the color of each
> pixel of each component. It probably just says "draw whatever" and then
> the underlying OS takes care of the pixels. (Someone correct me if I am
> wrong here.)

You're wrong here.
 
> But you *can* draw to an image, then draw the image onto a component.

And you can "draw" directly onto a component, using that component's paint()
method. This is the most efficient way to address the original problem.

-- 
Paul Lutus
http://www.arachnoid.com


Relevant Pages

  • Re: paint program
    ... John Davison wrote: ... > the underlying OS takes care of the pixels. ...
    (comp.lang.java.programmer)
  • Re: paint program
    ... >>the underlying OS takes care of the pixels. ... He needs to access the pixels that are already drawn. ... the color of the pixel at coordinate for a given Swing component? ...
    (comp.lang.java.gui)
  • Re: [PATCH] leds: Further document parameters for blink_set()
    ... It was done so the caller could find out what timings the underlying ... hardware decided to chose if it couldn't match the timings specified ... This should be better documented and I'll take care of that. ...
    (Linux-Kernel)
  • Re: Font lines per inch: Verdana vs Trebuchet MS
    ... Thanks a lot for your help, Burt. ... Take care, ... >tag that will let you set the pixels of line to line white space ...
    (microsoft.public.windowsxp.general)
  • Re: Straightening quotes
    ... >>> underlying problem, one that should be taken care of. ... because this is a computer program? ... They have bugs. ...
    (microsoft.public.mac.office.entourage)