Advertisement
Guest User

Untitled

a guest
Dec 13th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. package Template;
  2.  
  3. import javafx.application.Application;
  4. import javafx.geometry.Insets;
  5. import javafx.scene.Scene;
  6. import javafx.scene.layout.GridPane;
  7. import javafx.stage.Stage;
  8.  
  9. public class MainApp extends Application {
  10.  
  11. public static void main(String[] args) {
  12. Application.launch(args);
  13. }
  14.  
  15. @Override
  16. public void start(Stage stage) {
  17. stage.setTitle("");
  18. GridPane pane = new GridPane();
  19. this.initContent(pane);
  20.  
  21. Scene scene = new Scene(pane);
  22. stage.setScene(scene);
  23. stage.show();
  24. }
  25.  
  26. // -------------------------------------------------------------------------
  27.  
  28.  
  29. private void initContent(GridPane pane) {
  30. // show or hide grid lines
  31. pane.setGridLinesVisible(false);
  32.  
  33. // set padding of the pane
  34. pane.setPadding(new Insets(20));
  35. // set horizontal gap between components
  36. pane.setHgap(10);
  37. // set vertical gap between components
  38. pane.setVgap(10);
  39.  
  40. // pane.setPrefSize(50, 50);
  41.  
  42. }
  43.  
  44. // -----------------------------------------------------
  45. // Button actions
  46.  
  47.  
  48.  
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement