Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

createimage only in paint ?

Status
Not open for further replies.

Themuppeteer

Programmer
Joined
Apr 4, 2001
Messages
449
Location
BE
How comes that one can do only a createImage in the paint function ? Otherwise it returns null.

thnx

Greetz,
img


NOSPAM_themuppeteer@hotmail.com (for mails, remove the NOSPAM_)

"Those who say they understand chess, understand nothing"

-- Robert HUBNER
 
That isn't true. You can create an image object anywhere.
 
Thnx for your reply brownie124,

Well, it is true.
This stands in my paint:

if (doubleBuffer == null)
doubleBuffer = createImage(500, 500);
}

If I place the line in my jbInit(), createImage returns
null.(Really, I'm not lying)



Greetz,
img


NOSPAM_themuppeteer@hotmail.com (for mails, remove the NOSPAM_)

"Those who say they understand chess, understand nothing"

-- Robert HUBNER
 
Post your code, it sounds like a programmatical error ...
 
not much of code posting (I already posted it), just put the createimage in the init of your frame. You'll see it will not work and returns null.

Greetz,
img


NOSPAM_themuppeteer@hotmail.com (for mails, remove the NOSPAM_)

"Those who say they understand chess, understand nothing"

-- Robert HUBNER
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top