Article View: borland.public.jbuilder.java.api
Article #3090Prob with Create Image with Component
From: Georges YOUNES
Date: Thu, 30 Apr 1998 00:00
Date: Thu, 30 Apr 1998 00:00
33 lines
1088 bytes
1088 bytes
Hi there
I have a prob with createImage(int x, int y, ..) this method is in the Class
Component.
My code is
class MyRect extends Component
{
Image im;
public void draw()
{
im = createImage(100,100, this);
Graphics gc = im.getGraphics();
gc.DrawString("....",10,10);
}
.
.
.
}
I try to instanciate MyRect
MyRect mr = new MyRect();
mr.draw();
when I call the MyRect draw() method I get NullpointerException because the
method createImage(...) return a null value... I don't know why ???
Somebody can help thanks :)
Best regards Georges
Technical Details
Message-ID:
<6i9t2p$gav9@forums.borland.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: 1089d0,6f70f77ccd0e87ce,start X-Google-Attributes: gid1089d0,public From: "Georges YOUNES" <g.younes@cross-systems.com> Subject: Prob with Create Image with Component Date: 1998/04/30 Message-ID: <6i9t2p$gav9@forums.borland.com> X-Deja-AN: 349056975 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.api