
-----------------------------------
mariomania88
Tue May 10, 2005 6:11 pm

How can I import images into my program using JFrame?
-----------------------------------
^topic

For further clarification, I'm making a database program, and I want the user to be able to import pictures.  If you could give me a sample program with the code in it, or just the code, I would be very happy.

- mariomania88

-----------------------------------
rizzix
Tue May 10, 2005 6:17 pm


-----------------------------------
what do you mean by "import" images?

-----------------------------------
mariomania88
Tue May 10, 2005 6:21 pm


-----------------------------------
sorry for not being clear

i mean to put images on the panel

lets say i have an image of a car called "car.gif", and I wanted to put it on the screen

something like that

eventually I want a function where the user can import their own images

-----------------------------------
JackTruong
Tue May 10, 2005 9:31 pm


-----------------------------------
Chris, look at the constructor for JLabel and figure something out. If you can't find out how, I'll give you a hand in class.

I already got this working.

Hope you know who this is.

-----------------------------------
mariomania88
Tue May 10, 2005 10:17 pm


-----------------------------------
Chris, look at the constructor for JLabel and figure something out. If you can't find out how, I'll give you a hand in class.

I already got this working.

Hope you know who this is.

jack, the name gives it away (and the fact that you said that was your username in class today)

-----------------------------------
JackTruong
Tue May 10, 2005 11:00 pm


-----------------------------------
Good.

Did you look at the constructors for JLabel?
