Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package c12_juan_login;
- import javafx.application.Application;
- import javafx.geometry.Insets;
- import javafx.geometry.Pos;
- import javafx.scene.Scene;
- import javafx.scene.control.Label;
- import javafx.scene.control.PasswordField;
- import javafx.scene.control.TextField;
- import javafx.scene.layout.GridPane;
- import javafx.scene.text.Font;
- import javafx.scene.text.Text;
- import javafx.stage.Stage;
- /**
- *
- * @author charm
- */
- public class C12_JUAN_Login extends Application {
- public static void main (String[] args){
- launch(args);
- }
- @Override
- public void start(Stage primaryStage) throws Exception {
- Text sceneTitle = new Text("Welcome!");
- sceneTitle.setFont(Font.font("Century Gothic"));
- GridPane greed = new GridPane();
- greed.add(sceneTitle, 0, 0, 2, 1);
- greed.setAlignment(Pos.CENTER);
- greed.setPadding(new Insets(25, 25, 25, 25));
- greed.setHgap(10);
- greed.setVgap(10);
- Label userName = new Label("User Name:");
- greed.add(userName, 0, 1);
- TextField userTextField = new TextField();
- greed.add(userTextField, 1, 1);
- Label password = new Label("Password:");
- greed.add(password, 0, 2);
- PasswordField passwordField = new PasswordField();
- greed.add(passwordField, 1, 2);
- Scene scenery = new Scene(greed, 300, 275);
- primaryStage.setScene(scenery);
- primaryStage.show();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement