diff options
Diffstat (limited to 'src/IDE/IDE')
-rw-r--r-- | src/IDE/IDE/HelloApplication.java | 25 | ||||
-rw-r--r-- | src/IDE/IDE/HelloController.java | 14 | ||||
-rw-r--r-- | src/IDE/IDE/hello-view.fxml | 16 |
3 files changed, 55 insertions, 0 deletions
diff --git a/src/IDE/IDE/HelloApplication.java b/src/IDE/IDE/HelloApplication.java new file mode 100644 index 0000000..aaa728f --- /dev/null +++ b/src/IDE/IDE/HelloApplication.java @@ -0,0 +1,25 @@ +package IDE; + +import javafx.application.Application; +import javafx.fxml.FXMLLoader; +import javafx.scene.Scene; +import javafx.stage.Stage; +import java.io.File; +import javafx.scene.Parent; + +import java.io.IOException; + +public class HelloApplication extends Application { + @Override + public void start(Stage stage) throws IOException { + Parent root = FXMLLoader.load(getClass().getResource("hello-view.fxml")); + Scene scene = new Scene(root, 320, 240); + stage.setTitle("Hello!"); + stage.setScene(scene); + stage.show(); + } + + public static void main(String[] args) { + launch(); + } +}
\ No newline at end of file diff --git a/src/IDE/IDE/HelloController.java b/src/IDE/IDE/HelloController.java new file mode 100644 index 0000000..877e5ba --- /dev/null +++ b/src/IDE/IDE/HelloController.java @@ -0,0 +1,14 @@ +package IDE; + +import javafx.fxml.FXML; +import javafx.scene.control.Label; + +public class HelloController { + @FXML + private Label welcomeText; + + @FXML + protected void onHelloButtonClick() { + welcomeText.setText("Welcome to the FORTRAN compiler application!"); + } +}
\ No newline at end of file diff --git a/src/IDE/IDE/hello-view.fxml b/src/IDE/IDE/hello-view.fxml new file mode 100644 index 0000000..c31d9e2 --- /dev/null +++ b/src/IDE/IDE/hello-view.fxml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<?import javafx.geometry.Insets?> +<?import javafx.scene.control.Label?> +<?import javafx.scene.layout.VBox?> + +<?import javafx.scene.control.Button?> +<VBox alignment="CENTER" spacing="20.0" xmlns:fx="http://javafx.com/fxml" + fx:controller="IDE.HelloController"> + <padding> + <Insets bottom="20.0" left="20.0" right="20.0" top="20.0"/> + </padding> + + <Label fx:id="welcomeText"/> + <Button text="Hello!" onAction="#onHelloButtonClick"/> +</VBox> |