Created first version of GUI-Design
parent
363a1ad63f
commit
82c157e879
@ -0,0 +1,8 @@
|
|||||||
|
Alert alert = new Alert(Alert.AlertType.ERROR);
|
||||||
|
alert.setTitle("File not found");
|
||||||
|
alert.setContentText("File could not be located");
|
||||||
|
alert.showAndWait().ifPresent(rs -> {
|
||||||
|
if (rs == ButtonType.OK) {
|
||||||
|
System.out.println("Pressed OK.");
|
||||||
|
}
|
||||||
|
});
|
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
Binary file not shown.
After Width: | Height: | Size: 47 KiB |
@ -0,0 +1,23 @@
|
|||||||
|
package de.thm.tlf.photoViewer;
|
||||||
|
|
||||||
|
import javafx.scene.image.Image;
|
||||||
|
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.FileNotFoundException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
|
||||||
|
public class Picture {
|
||||||
|
private Image image;
|
||||||
|
|
||||||
|
public Picture (String fileRef) {
|
||||||
|
try {
|
||||||
|
image = new Image(new FileInputStream(fileRef));
|
||||||
|
} catch (FileNotFoundException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Image getImage() {
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
package de.thm.tlf.photoViewer;
|
||||||
|
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
|
||||||
|
public class PicturePreview extends Picture{
|
||||||
|
|
||||||
|
public PicturePreview(String fileRef) {
|
||||||
|
super(fileRef);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
Alert alert = new Alert(Alert.AlertType.ERROR);
|
||||||
|
alert.setTitle("File not found");
|
||||||
|
alert.setContentText("File could not be located");
|
||||||
|
alert.showAndWait().ifPresent(rs -> {
|
||||||
|
if (rs == ButtonType.OK) {
|
||||||
|
System.out.println("Pressed OK.");
|
||||||
|
}
|
||||||
|
});
|
Loading…
Reference in New Issue