Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Template;
- import javafx.application.Application;
- import javafx.geometry.Insets;
- import javafx.scene.Scene;
- import javafx.scene.layout.GridPane;
- import javafx.stage.Stage;
- public class MainApp extends Application {
- public static void main(String[] args) {
- Application.launch(args);
- }
- @Override
- public void start(Stage stage) {
- stage.setTitle("");
- GridPane pane = new GridPane();
- this.initContent(pane);
- Scene scene = new Scene(pane);
- stage.setScene(scene);
- stage.show();
- }
- // -------------------------------------------------------------------------
- private void initContent(GridPane pane) {
- // show or hide grid lines
- pane.setGridLinesVisible(false);
- // set padding of the pane
- pane.setPadding(new Insets(20));
- // set horizontal gap between components
- pane.setHgap(10);
- // set vertical gap between components
- pane.setVgap(10);
- // pane.setPrefSize(50, 50);
- }
- // -----------------------------------------------------
- // Button actions
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement