Article View: borland.public.jbuilder.java.language
Article #17948Re: Problems with graphic context
From: Greg Hamer
Date: Wed, 02 Sep 1998 00:00
Date: Wed, 02 Sep 1998 00:00
19 lines
1320 bytes
1320 bytes
Your component needs to have its peer hooked up before you can get it to create an image. the addNotify method is called when the peer has been setup so you can override this method, being sure to still call super.addNotify() and create any images that you will be needing. Christoph Happich wrote: > Hi! > I"m getting a NullPointer Exception just by adding this line to my > component's constructor: > createImage(1,1).getGraphics(); > I think it's because the graphic context is not available in unvisible > components. But, it should, because the context of the image has > nothing to do with the component's context. > I need that image for doube buffering. The buffer must be created > BEFORE my component is drawn. > Any ideas ? > Christoph
Technical Details
Message-ID:
<35EDF86F.7BAC882A@inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<35EDB43C.199BB68B@techfa.uni-bielefeld.de>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,c43cd982853305aa X-Google-Attributes: gidf74b3,public From: Greg Hamer <ghamer@inprise.com> Subject: Re: Problems with graphic context Date: 1998/09/02 Message-ID: <35EDF86F.7BAC882A@inprise.com> X-Deja-AN: 387339323 Content-Transfer-Encoding: 7bit References: <35EDB43C.199BB68B@techfa.uni-bielefeld.de> Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language