Re: drawImage(Image, x, y, ImageObserver) in a server-side app (not Swing/AWT)

From: ak (spam_at_imagero.com)
Date: 02/23/04


Date: Mon, 23 Feb 2004 21:13:15 +0100


> I suspect that g2d.drawImage(topImage, 10, 10, Color.red, null); does
> not work because the last parameter (ImageObserver interface) is null.
wrong, this is legal.

your image is created but not loaded.
use MediaTracker or better (simpler) put your topImage in ImageIcon.

____________

http://reader.imagero.com the best java image reader.



Relevant Pages

  • Re: DragnDrop & Using Drag Images
    ... ImageIcon (which automatically uses a MediaTracker internally), ... panel that contains the item to drag - and it shows - final proof that the ... But it still isn't used in the drag {:v( ...
    (comp.lang.java.gui)
  • Re: loading image broken in 5.0?
    ... adding a MediaTracker should ... > I was under the impression that ImageIcon() uses a MediaTracker in it's ... few different image editors. ...
    (comp.lang.java.programmer)