Example usage for javafx.scene.layout Border EMPTY

List of usage examples for javafx.scene.layout Border EMPTY

Introduction

In this page you can find the example usage for javafx.scene.layout Border EMPTY.

Prototype

Border EMPTY

To view the source code for javafx.scene.layout Border EMPTY.

Click Source Link

Document

An empty Border, useful to use instead of null.

Usage

From source file:Pages.LandingPage.java

public void createUser(Stage theStage) {
    //scrollpane//from   www. j  a va  2 s.co  m
    scrollpane = new ScrollPane();
    scrollpane.setPrefSize(400, 250);
    scrollpane.setStyle("-fx-padding: 10 0 0 0; -fx-background-color:TRANSPARENT;");
    scrollpane.setBorder(Border.EMPTY);
    scrollpane.setVbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED);
    scrollpane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);

    //User box with components
    userbox = new VBox();
    userbox.setStyle("-fx-alignment: center; -fx-background-color:WHITE;");
    userbox.setSpacing(35);
    userbox.setPrefSize(400, 250);
    //Text fields
    fields = new textField();
    new_name = fields.textField("Full Name", "16");
    new_user = fields.validateTextField("Username", "User name can't be empty", "15");
    new_pass = fields.PasswordField("Password", "Password can't be empty", "15");
    country = fields.textField("Country", "16");
    date = new JFXDatePicker();
    date.setEditable(false);
    profilePicture("/Icons/user.PNG", theStage);

    userbox.getChildren().add(new_name);
    userbox.getChildren().add(new_user);
    userbox.getChildren().add(new_pass);
    userbox.getChildren().add(country);
    userbox.getChildren().add(date);

    scrollpane.setContent(userbox);
}