J
John Broadley
I am building a simple Java application. I have a list box in which I
list a list of image files .jpg, and I want to create an area beside
the listbox, where whenever the user click on an image in the list, I
can display the image for him. I tried the ImageIcon class, and
creating an instance and putting it in a JLabel, which is in a
scrollable window. It works fine. But now, when I want to display a
new image. Do I need to create all these objects again and agian. What
if I have 100 images, will I end up with a huge number of objects
creates my my program. Please note that the average size of the images
is 500kb.
I saw also a lot of talking about Toolkit related code, but I was not
able to use such library in my Eclipse platform. Do I need to import
anything to be able to use the Toolkit facilities like getting for
example the screen resolution?
Appreciate your help.
list a list of image files .jpg, and I want to create an area beside
the listbox, where whenever the user click on an image in the list, I
can display the image for him. I tried the ImageIcon class, and
creating an instance and putting it in a JLabel, which is in a
scrollable window. It works fine. But now, when I want to display a
new image. Do I need to create all these objects again and agian. What
if I have 100 images, will I end up with a huge number of objects
creates my my program. Please note that the average size of the images
is 500kb.
I saw also a lot of talking about Toolkit related code, but I was not
able to use such library in my Eclipse platform. Do I need to import
anything to be able to use the Toolkit facilities like getting for
example the screen resolution?
Appreciate your help.