Unimatrix_001
asked on
Loading a gif using awt??
Hi everybody,
can anybody give me a shove in the right direction?
can anybody give me a shove in the right direction?
Image image = Toolkit.getDefaultToolkit( ).createIm age("yourG if.gif");
in an applet: Image image1 = getImage(<Url (ie. getCodeBase())>, "pic1.gif");
in an application: Image image1 = Toolkit.getDefaultToolkit( ).getImage (<URL>) OR Toolkit.getDefaultToolkit( ).getImage (<path>)
then you could put something like this in your paint method:
g.drawImage(image1, 0, 0, null); which will draw your image at 0,0 coordinate
in an application: Image image1 = Toolkit.getDefaultToolkit(
then you could put something like this in your paint method:
g.drawImage(image1, 0, 0, null); which will draw your image at 0,0 coordinate
ASKER
ooph! Looks like I'm splitting points here! :D....does both of those methods sorta like count in it being loaded into a frame?
sorta like, frame.add(image);
can I do that?
sorta like, frame.add(image);
can I do that?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok thanks...I'll request a point split.
Dear Unimatrix_001
I've refunded 20 points to enable you to accept the comment for one expert and to post a
"Points for <expertname>" Q for the other expert in the same topic area.
Please:
1) Post the link to the original Q in the "Points for <expertname>" and
2) Add in the original Q a comment with the link to the "Points for <expertname>", thus the email notif will warn the expert.
modulo
Community Support Moderator
Experts Exchange
I've refunded 20 points to enable you to accept the comment for one expert and to post a
"Points for <expertname>" Q for the other expert in the same topic area.
Please:
1) Post the link to the original Q in the "Points for <expertname>" and
2) Add in the original Q a comment with the link to the "Points for <expertname>", thus the email notif will warn the expert.
modulo
Community Support Moderator
Experts Exchange
ASKER
Thank you Bobbit!
CEHJ please visit:
https://www.experts-exchange.com/questions/20559044/Points-for-CEHJ.html
CEHJ please visit:
https://www.experts-exchange.com/questions/20559044/Points-for-CEHJ.html
> Thank you Bobbit!
no prob ;)
no prob ;)