Article View: borland.public.jbuilder.java.language
Article #19513Re: Strange bug in create image......i think.... :)
From: Bryan E. Boone
Date: Mon, 02 Feb 1998 00:00
Date: Mon, 02 Feb 1998 00:00
27 lines
1461 bytes
1461 bytes
createImage will fail for a component until addNotify is called. This creates the peer. Julian Fainlight wrote in message <34D0CED4.D8943A1F@netvalueinc.com>... >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:
<6b4uhm$56u7@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<34D0CED4.D8943A1F@netvalueinc.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,41a65ab18c98f96d X-Google-Attributes: gidf74b3,public From: "Bryan E. Boone" <sasbeb@wnt.sas.com> Subject: Re: Strange bug in create image......i think.... :) Date: 1998/02/02 Message-ID: <6b4uhm$56u7@forums.borland.com> X-Deja-AN: 321402459 References: <34D0CED4.D8943A1F@netvalueinc.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: None Newsgroups: borland.public.jbuilder.java.language