2020-05-06 14:37:59 +02:00

43 lines
1.2 KiB
Java

package ihm;
import java.net.URL;
import java.util.Locale;
import java.util.ResourceBundle;
import javafx.application.Application;
import javafx.event.EventHandler;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;
import javafx.stage.WindowEvent;
import main.GestionnaireJeu;
public class Main extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
final URL fxmlURL = getClass().getResource("ressources/Menu.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Pane root = fxmlLoader.load();
primaryStage.setTitle("Shadow Hunters");
primaryStage.setScene(new Scene(root));
primaryStage.centerOnScreen();
primaryStage.setOnCloseRequest(new EventHandler<WindowEvent>() {
@Override
public void handle(WindowEvent arg0) {
System.exit(0);
}
});
primaryStage.setMaximized(true);
primaryStage.show();
}
public static void main(String[] args) {
//System.err.close();
GestionnaireJeu gj = GestionnaireJeu.getGestionnaireJeu();
launch(args);
}
}