VPR-Frontend/hellofx/app/src/main/java/client/MainApplication.java

26 lines
772 B
Java
Raw Normal View History

package client;
2021-11-13 20:11:59 +01:00
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.stage.Stage;
import java.io.IOException;
2021-11-15 13:17:43 +01:00
import java.util.Objects;
2021-11-13 20:11:59 +01:00
public class MainApplication extends Application {
2021-11-13 20:11:59 +01:00
@Override
public void start(Stage stage) throws IOException {
FXMLLoader fxmlLoader = new FXMLLoader(MainApplication.class.getResource("main-view.fxml"));
2021-11-15 13:17:43 +01:00
Scene scene = new Scene(fxmlLoader.load(), 1200, 700);
scene.getStylesheets().add(Objects.requireNonNull(MainApplication.class.getResource("style.css")).toExternalForm());
2021-11-13 20:11:59 +01:00
stage.setTitle("Hello!");
stage.setScene(scene);
stage.show();
2021-11-13 20:11:59 +01:00
}
public static void main(String[] args) {
launch();
}
}