}
}//GEN-LAST:event_mnuBackgroundActionPerformed
private void mnuRoomBackgroundActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuRoomBackgroundActionPerformed
ZoneLogic zone = drawer.getSelectedZone();
if (zone == null) {
JOptionPane.showMessageDialog(this,
I18n.msg("select_room_first"));
} else {
final JFileChooser fc = new JFileChooser(Info.getDatafilePath() + "/resources/");
OpenDialogFileFilter filter = new OpenDialogFileFilter();
filter.addExtension("png");
filter.addExtension("jpeg");
filter.addExtension("jpg");
filter.setDescription("Image files (png, jpeg)");
fc.addChoosableFileFilter(filter);
fc.setFileFilter(filter);
int returnVal = fc.showOpenDialog(this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fc.getSelectedFile();
//This is where a real application would open the file.
LOG.info("Opening " + file.getAbsolutePath());
zone.getPojo().setTexture(file.getName());
drawer.setNeedRepaint(true);
frameMap.validate();
}
}
}//GEN-LAST:event_mnuRoomBackgroundActionPerformed