int resp = chooser.showOpenDialog(Packer.this);
if (resp == JFileChooser.APPROVE_OPTION) {
File[] selected = chooser.getSelectedFiles();
for (int i=0;i<selected.length;i++) {
try {
sprites.addElement(new Sprite(selected[i]));
} catch (IOException x) {
x.printStackTrace();
JOptionPane.showMessageDialog(Packer.this, "Unable to load: "+selected[i].getName());
}
}