Hi,
im testing the filechooser at the moment.
this is what i got:
FileChooser fileChooser = new FileChooser();
FileChooser.ExtensionFilter extFilter = new FileChooser.ExtensionFilter("PNG files (*.png)", "*.png");
fileChooser.getExtensionFilters().add(extFilter);
file = fileChooser.showOpenDialog(null);
iv.setImage(new javafx.scene.image.Image(getClass().getResourceAsStream(file.getPath())));
gettin:
java.lang.NullPointerException: Input stream must not be null
file.getAbsolutPath() doesn't work either, i thought this was the reason.
what am i doing wrong here?
p.png = picture in the filechooser package.
iv.setImage(new javafx.scene.image.Image(getClass().getResourceAsStream(p.png)));
works fine.
Thanks for the help.
im using windows.