Prepare JavaFX integration

* Added JavaFX and FXML dependencies to pom.xml and module-info.java
* Added Startup Application
* Added ChatScene with ChatSceneController
This commit is contained in:
2020-03-26 20:23:25 +01:00
parent 364ec6f04e
commit c6d074b84a
5 changed files with 105 additions and 0 deletions

View File

@ -0,0 +1,34 @@
package envoy.client.ui;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.layout.GridPane;
import javafx.stage.Stage;
/**
* Project: <strong>envoy-client</strong><br>
* File: <strong>Startup.java</strong><br>
* Created: <strong>26.03.2020</strong><br>
*
* @author Kai S. K. Engelbart
* @since Envoy Client v0.1-beta
*/
public final class Startup extends Application {
/**
* {@inheritDoc}
*/
@Override
public void start(Stage primaryStage) throws Exception {
var loader = new FXMLLoader(getClass().getResource("ChatScene.fxml"));
var anchorPane = loader.<GridPane>load();
var chatScene = new Scene(anchorPane);
primaryStage.setTitle("Envoy");
primaryStage.setScene(chatScene);
primaryStage.show();
}
public static void main(String[] args) { launch(args); }
}