30 lines
862 B
Java
30 lines
862 B
Java
package it.polimi.ingsw.gc14;
|
|
|
|
import javafx.application.Application;
|
|
import javafx.fxml.FXMLLoader;
|
|
import javafx.scene.Scene;
|
|
import javafx.stage.Stage;
|
|
|
|
import java.io.IOException;
|
|
|
|
/**
|
|
* JavaFX application entry point used to start the graphical interface.
|
|
*/
|
|
public class HelloApplication extends Application {
|
|
|
|
/**
|
|
* Starts the JavaFX application and loads the initial FXML view.
|
|
*
|
|
* @param stage the primary stage of the application.
|
|
* @throws IOException if the FXML file cannot be loaded.
|
|
*/
|
|
@Override
|
|
public void start(Stage stage) throws IOException {
|
|
FXMLLoader fxmlLoader = new FXMLLoader(HelloApplication.class.getResource("hello-view.fxml"));
|
|
Scene scene = new Scene(fxmlLoader.load(), 320, 240);
|
|
stage.setTitle("Hello!");
|
|
stage.setScene(scene);
|
|
stage.show();
|
|
}
|
|
}
|