Article View: borland.public.jbuilder.java.language
Article #19491Strange bug in create image......i think.... :)
From: Julian Fainlight
Date: Thu, 29 Jan 1998 00:00
Date: Thu, 29 Jan 1998 00:00
22 lines
1276 bytes
1276 bytes
hi,
I am trying to write a class that will generate bitmapped images....
i would prefer the class not to extend another class (like component),
but have done so due to the grapic restrictions.... this is ok... but i
was trying to create an image and attach a graphics object to it...
Image buffer;
Graphics picture;
buffer = this.createImage(106,73);
picture = buffer.getGraphics();
if i execute the method createimage any place outside of paint(), the
buffer is null and getgraphics throws a null pointer exception.... WHY?
i know i am missing something... but why cant i create images and
operate them on the fly without instantiating a component.... or having
to do everything by some clever method from within the paint() method.
HELP!!!!!!!!!
Technical Details
Message-ID:
<34D0CED4.D8943A1F@netvalueinc.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,41a65ab18c98f96d,start X-Google-Attributes: gidf74b3,public From: Julian Fainlight <jfainlight@netvalueinc.com> Subject: Strange bug in create image......i think.... :) Date: 1998/01/29 Message-ID: <34D0CED4.D8943A1F@netvalueinc.com> X-Deja-AN: 320337611 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Organization: None Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language