DISPLAY many picture

I want to display many picture (gif, jpg) in a window with their names (all to be shrink to the same size). i also want to be able to select one of the pictures (just one at a time). how can I do it?(p.s- the problem is with the way to display them, no to laod from the Hard
[297 byte] By [NMBa] at [2007-10-3 4:09:07]
# 1
Use a JComponent such as JPanel to provide the drawing surface, get its Graphics using JComponent.getGraphics, then you can use the Graphics methods drawImage and drawString to draw on it. You can rescale the images with drawImage.
pkwoostera at 2007-7-14 22:09:04 > top of Java-index,Java Essentials,Java Programming...
# 2
[url http://java.sun.com/docs/books/tutorial/uiswing/components/list.html]How to Use Lists[/url]Add the image and text to a JLabel. Add the label to the list. Write a custom renderer to return the label as the actual renderer.
camickra at 2007-7-14 22:09:04 > top of Java-index,Java Essentials,Java Programming...
# 3
I forgot to say- I'm working with SWT on eclipse... so i don't have Jlabel or JComposite etc...
NMBa at 2007-7-14 22:09:04 > top of Java-index,Java Essentials,Java Programming...
# 4
I think you want the org.eclipse.swt.widgets.Canvas class and ImageUtilitities.drawImage.I'm not an SWT expert, so there may be a better way to do it in that system.
pkwoostera at 2007-7-14 22:09:04 > top of Java-index,Java Essentials,Java Programming...
# 5
I think that SWT has a Label class that could be used in the same manner as the JLable that camickr suggested, and you could arrange those in a Table.
pkwoostera at 2007-7-14 22:09:04 > top of Java-index,Java Essentials,Java Programming...
# 6
how do I add a Label to a table?
NMBa at 2007-7-14 22:09:04 > top of Java-index,Java Essentials,Java Programming...