}
public Scene load() {
// TODO i18n
Loader o=null;
try {
o = loader.newInstance();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
if(o==null){
System.err.println("Can not instanciate loader "+loader.getName());
return null;
}
try {
return o.load(selectedFile.getAbsolutePath());
} catch (FileNotFoundException e) {
System.err.println("Can not read file "+selectedFile.getAbsolutePath());
} catch (IncorrectFormatException e) {
e.printStackTrace();
System.err.println("Invalid file format : "+selectedFile.getAbsolutePath());