fdai7736
11 months ago
4 changed files with 105 additions and 1 deletions
-
65pom.xml
-
5src/main/java/de/hsfulda/onses/Main.java
-
22src/main/java/de/hsfulda/onses/controllers/MainController.java
-
14src/main/resources/de/hsfulda/onses/views/main.fxml
@ -1,7 +1,10 @@ |
|||
package de.hsfulda.onses; |
|||
|
|||
import de.hsfulda.onses.controllers.MainController; |
|||
import javafx.application.Application; |
|||
|
|||
public class Main { |
|||
public static void main(String[] args) { |
|||
System.out.println("Hello world!"); |
|||
Application.launch(MainController.class); |
|||
} |
|||
} |
@ -0,0 +1,22 @@ |
|||
package de.hsfulda.onses.controllers; |
|||
|
|||
import de.hsfulda.onses.Main; |
|||
import javafx.application.Application; |
|||
import javafx.fxml.FXMLLoader; |
|||
import javafx.scene.Parent; |
|||
import javafx.scene.Scene; |
|||
import javafx.stage.Stage; |
|||
|
|||
import java.io.IOException; |
|||
import java.util.Objects; |
|||
|
|||
public class MainController extends Application { |
|||
@Override |
|||
public void start(Stage stage) throws IOException { |
|||
final Parent parent = FXMLLoader.load(Objects.requireNonNull(Main.class.getResource("views/main.fxml"))); |
|||
|
|||
stage.setTitle("Onses"); |
|||
stage.setScene(new Scene(parent)); |
|||
stage.show(); |
|||
} |
|||
} |
@ -0,0 +1,14 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
|
|||
<?import java.lang.*?> |
|||
<?import java.util.*?> |
|||
<?import javafx.scene.*?> |
|||
<?import javafx.scene.control.*?> |
|||
<?import javafx.scene.layout.*?> |
|||
|
|||
<AnchorPane xmlns="http://javafx.com/javafx" |
|||
xmlns:fx="http://javafx.com/fxml" |
|||
fx:controller="de.hsfulda.onses.controllers.MainController" |
|||
prefHeight="400.0" prefWidth="600.0"> |
|||
|
|||
</AnchorPane> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue