🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #17603

Re: Does Image an abstract class ?

#17603
From: Greg Hamer
Date: Mon, 26 Oct 1998 00:00
24 lines
1497 bytes
createImage is a factory method that creates a concrete instance of a class
that extends java.awt.Image. Different VM's will create different concrete
classes and may implement the methods differently, but you can rely that all
the methods defined in the Image class are at your disposal.  For fun you can
print out the name of the actual class created with System.err.println("the
image is of class " + im.getClass().toString());

Eyal Hirsch wrote:

> Hi All,
>   I'm starting to learn JBuilder and ran across a demo that uses the Image
> abstract class,
>   using createImage it. What I fail to understand is how can I later use
> it's methods
>   when this class is declared as abstract ? Also if there is an underlying
> class that
>   I've failed to notice, which one is it ?
>   Following is the code :
>
>    Image im = createImage ( getSize().width, getSize().height );
>    Graphics buf = im.getGraphics();
>
> TIA,
>   Eyal.
Technical Details
Message-ID: <3634BC98.A7C6B290@inprise.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <710672$3kh14@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,a88b34d4cbf6d3a0
X-Google-Attributes: gidf74b3,public
From: Greg Hamer <ghamer@inprise.com>
Subject: Re: Does Image an abstract class ?
Date: 1998/10/26
Message-ID: <3634BC98.A7C6B290@inprise.com>
X-Deja-AN: 405265875
Content-Transfer-Encoding: 7bit
References: <710672$3kh14@forums.borland.com>
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language