Inserting a picture into my java program
Posted: Sat May 15, 2004 1:01 am
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
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