Page 1 of 1

Inserting a picture into my java program

Posted: Sat May 15, 2004 1:01 am
by sh00ter555
Hi, my name is jason and i just started to use this forum. I was wondering if someone can help me out in adding a background picture to my program. I have a picture that i have saved on my computer called "tablePicture.gif" and was wondering how i add this picture to my code so it is visable when i run the program.
so far i have done this:
I made sure that "java.awt.*" was imported at the top of the program.
then I made a "private Image tablePicture"
i think that is right so far, but now im stuck.

PS: im assuming that i need a .getImage or something, but im not sure. If anyone would be so kind to help me out it would be greatly appriciated.
Thank you,
Jason

Posted: Sat May 15, 2004 1:34 am
by s_reynisson
Hi sh00ter555 and welcome to the forums! These are TextPad forums but you sure are free to try your luck in the Java forum with your problem. Keep in mind that the users here are somewhat focused on TextPad and not Java. Some here are quite good at it but don't bet on them seeing your Q at once. HTH

Posted: Sat May 15, 2004 1:39 am
by sh00ter555
Oh, sorry about that, didnt realize there was a java forum. My bad. I guess i should of thought about that first before i posted. Ill go post my question in there now, thanx.