diff --git a/lab-04/NewAccount/.idea/.gitignore b/lab-04/NewAccount/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/lab-04/NewAccount/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/lab-04/NewAccount/.idea/artifacts/JavaFXApp.xml b/lab-04/NewAccount/.idea/artifacts/JavaFXApp.xml new file mode 100644 index 0000000..62a70c4 --- /dev/null +++ b/lab-04/NewAccount/.idea/artifacts/JavaFXApp.xml @@ -0,0 +1,15 @@ + + + $PROJECT_DIR$/out/artifacts/JavaFXApp + + + + + + + + + + + \ No newline at end of file diff --git a/lab-04/NewAccount/.idea/compiler.xml b/lab-04/NewAccount/.idea/compiler.xml new file mode 100644 index 0000000..217af47 --- /dev/null +++ b/lab-04/NewAccount/.idea/compiler.xml @@ -0,0 +1,23 @@ + + + + + + diff --git a/lab-04/NewAccount/.idea/description.html b/lab-04/NewAccount/.idea/description.html new file mode 100644 index 0000000..cc10d56 --- /dev/null +++ b/lab-04/NewAccount/.idea/description.html @@ -0,0 +1,2 @@ +Simple JavaFX 2.0 application that includes simple .fxml file with attached controller and Main class to quick start. Artifact to build JavaFX application is provided. + \ No newline at end of file diff --git a/lab-04/NewAccount/.idea/encodings.xml b/lab-04/NewAccount/.idea/encodings.xml new file mode 100644 index 0000000..97626ba --- /dev/null +++ b/lab-04/NewAccount/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/lab-04/NewAccount/.idea/gradle.xml b/lab-04/NewAccount/.idea/gradle.xml new file mode 100644 index 0000000..3e3960b --- /dev/null +++ b/lab-04/NewAccount/.idea/gradle.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/lab-04/NewAccount/.idea/libraries/javafx_swt.xml b/lab-04/NewAccount/.idea/libraries/javafx_swt.xml new file mode 100644 index 0000000..bd07006 --- /dev/null +++ b/lab-04/NewAccount/.idea/libraries/javafx_swt.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lab-04/NewAccount/.idea/misc.xml b/lab-04/NewAccount/.idea/misc.xml new file mode 100644 index 0000000..b8ef383 --- /dev/null +++ b/lab-04/NewAccount/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/lab-04/NewAccount/.idea/modules.xml b/lab-04/NewAccount/.idea/modules.xml new file mode 100644 index 0000000..2303917 --- /dev/null +++ b/lab-04/NewAccount/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/lab-04/NewAccount/.idea/uiDesigner.xml b/lab-04/NewAccount/.idea/uiDesigner.xml new file mode 100644 index 0000000..3b00020 --- /dev/null +++ b/lab-04/NewAccount/.idea/uiDesigner.xml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lab-04/NewAccount/.idea/vcs.xml b/lab-04/NewAccount/.idea/vcs.xml new file mode 100644 index 0000000..b2bdec2 --- /dev/null +++ b/lab-04/NewAccount/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/lab-04/NewAccount/NewAccount.iml b/lab-04/NewAccount/NewAccount.iml new file mode 100644 index 0000000..ea54784 --- /dev/null +++ b/lab-04/NewAccount/NewAccount.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/lab-04/NewAccount/src/sample/Main.java b/lab-04/NewAccount/src/sample/Main.java new file mode 100644 index 0000000..cf737c6 --- /dev/null +++ b/lab-04/NewAccount/src/sample/Main.java @@ -0,0 +1,44 @@ +package sample; + +import javafx.application.Application; +import javafx.geometry.HPos; +import javafx.geometry.Orientation; +import javafx.geometry.Pos; +import javafx.scene.Scene; +import javafx.scene.control.Label; +import javafx.scene.control.TextField; +import javafx.scene.layout.FlowPane; +import javafx.stage.Stage; + +/* +Using reference for flow panes: + https://docs.oracle.com/javase/8/javafx/api/javafx/scene/layout/FlowPane.html +- H.B. + */ +public class Main extends Application { + + @Override + public void start(Stage primaryStage) { + + FlowPane root = new FlowPane(Orientation.HORIZONTAL); + root.setColumnHalignment(HPos.LEFT); + root.setHgap(10); + root.setVgap(15); + root.setMaxWidth(275); + root.setPrefWrapLength(270); + + Label lFirstName = new Label("First name: "); + lFirstName.setMnemonicParsing(true);// makes tab work or Alt+n + TextField fFirstName = new TextField(); + lFirstName.setLabelFor(fFirstName); + root.getChildren().addAll(lFirstName, fFirstName); + primaryStage.setTitle("Create new account"); + primaryStage.setScene(new Scene(root, 300, 275)); + primaryStage.show(); + } + + + public static void main(String[] args) { + launch(args); + } +}