Skip to content
Snippets Groups Projects
Commit 0d5f9b4c authored by LABOUREL Arnaud's avatar LABOUREL Arnaud
Browse files

Corrections mineures de warning

parent 2f40d74b
Branches
No related tags found
No related merge requests found
......@@ -19,11 +19,10 @@ public class Display implements Initializable {
private Canvas canvas;
private Image image;
private ImageFactory imageFactory;
@Override
public void initialize(URL location, ResourceBundle resources) {
imageFactory = new BlankImageFactory();
ImageFactory imageFactory = new BlankImageFactory();
// TODO : changer la fabrique d'image pour construire des images.
this.image = imageFactory.makeImage();
......
......@@ -7,6 +7,7 @@ import javafx.scene.Scene;
import javafx.stage.Stage;
import java.io.IOException;
import java.util.Objects;
public class Main extends Application
......@@ -18,7 +19,7 @@ public class Main extends Application
@Override
public void start(Stage primaryStage) throws IOException {
Parent root =FXMLLoader.load(getClass().getClassLoader().getResource("fxml/Display.fxml"));
Parent root =FXMLLoader.load(Objects.requireNonNull(getClass().getClassLoader().getResource("fxml/Display.fxml")));
primaryStage.setTitle("Image display");
primaryStage.setScene(new Scene(root));
primaryStage.show();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment