Skip to main content

[JAVA2D] drawImage() question

1 reply [Last post]
Anonymous

here's a stupid question..

how do I draw an Image in my applet from a class?? the call to the method
is drawImage(Image, int, int, ImageObserver)

I usually type "this" for the imageobserver but that's when I draw an image
within the applet class..if I want to draw it from another class, what do I
put there instead of "this"??

Thanx

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Nidel, Michael

I believe I usually put null in for the ImageObserver... this
should work unless you want to get the extra functionality of the
ImageObserver...

Mike

> -----Original Message-----
> From: Discussion list for Java 2D API
> [mailto:JAVA2D-INTEREST@JAVA.SUN.COM]On Behalf Of Flavius Alecu
> Sent: Wednesday, March 24, 2004 8:31 AM
> To: JAVA2D-INTEREST@JAVA.SUN.COM
> Subject: [JAVA2D] drawImage() question
>
>
> here's a stupid question..
>
> how do I draw an Image in my applet from a class?? the call
> to the method
> is drawImage(Image, int, int, ImageObserver)
>
> I usually type "this" for the imageobserver but that's when I
> draw an image
> within the applet class..if I want to draw it from another
> class, what do I
> put there instead of "this"??
>
>
> Thanx
>
> ==============================================================
> =============
> To unsubscribe, send email to listserv@java.sun.com and
> include in the body
> of the message "signoff JAVA2D-INTEREST". For general help,
> send email to
> listserv@java.sun.com and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".