Skip to content
Snippets Groups Projects
Commit 1df7751e authored by vitawrap's avatar vitawrap
Browse files

Java: Chargement avec taille pref

parent 32cbaf8d
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,7 @@ package application; ...@@ -3,6 +3,7 @@ package application;
import javafx.application.Application; import javafx.application.Application;
import javafx.fxml.FXMLLoader; import javafx.fxml.FXMLLoader;
import javafx.scene.Scene; import javafx.scene.Scene;
import javafx.scene.control.SplitPane;
import javafx.stage.Stage; import javafx.stage.Stage;
import java.io.IOException; import java.io.IOException;
...@@ -11,7 +12,8 @@ public class ProjetApp extends Application { ...@@ -11,7 +12,8 @@ public class ProjetApp extends Application {
@Override @Override
public void start(Stage stage) throws IOException { public void start(Stage stage) throws IOException {
FXMLLoader fxmlLoader = new FXMLLoader(ProjetApp.class.getResource("ProjetView.fxml")); FXMLLoader fxmlLoader = new FXMLLoader(ProjetApp.class.getResource("ProjetView.fxml"));
Scene scene = new Scene(fxmlLoader.load(), 320, 240); SplitPane root = fxmlLoader.load();
Scene scene = new Scene(root, root.getPrefWidth(), root.getPrefHeight());
stage.setTitle("Hello!"); stage.setTitle("Hello!");
stage.setScene(scene); stage.setScene(scene);
stage.show(); stage.show();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment