Created
July 11, 2015 22:06
-
-
Save ahn94/be1829f9da69ca46dd30 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GridPane grid = new GridPane(); | |
grid.setPadding(new Insets(10, 10, 10, 10)); | |
grid.setVgap(8); | |
grid.setHgap(10); | |
Label username = new Label("Username"); | |
GridPane.setConstraints(username, 0, 0); | |
//Name input | |
TextField nameInput = new TextField(); | |
GridPane.setConstraints(nameInput, 1, 0); | |
nameInput.setPromptText("Name here"); | |
//password label | |
Label password = new Label("Password"); | |
GridPane.setConstraints(password, 0, 1); | |
//Password input | |
TextField passInput = new TextField(); | |
GridPane.setConstraints(passInput, 1, 1); | |
passInput.setPromptText("Password here"); | |
Button loginButton = new Button("Log In"); | |
GridPane.setConstraints(loginButton, 1, 2); | |
grid.getChildren().addAll(username, nameInput, passInput, password, loginButton); | |
Scene scene = new Scene(grid, 250, 120); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment