I am using a JFilehooser
to load multiple images to a File[]
.
I then want to load the File[]
to multiple ImageIcon
s. For example:
if (returnValue == JFileChooser.APPROVE_OPTION) {
File[] files = fileChooser.getSelectedFiles();
ImageIcon MyImage = new ImageIcon();
MyImage = files[0];
}
Of course that code doesn't work, but that's what I want to do. How do I do it?
As I understand you want to create array of
ImageIcon
for selected files: