Guest User

Untitled

a guest
Dec 17th, 2019
228
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. VBox layout1 = new VBox(20);
  2. Image image = new Image("file:Frogger_background.png");
  3. BackgroundSize backgroundSize = new BackgroundSize(320, 480, true, true, true, false);
  4. BackgroundImage loginBack = new BackgroundImage(image, BackgroundRepeat.REPEAT, BackgroundRepeat.NO_REPEAT,
  5. BackgroundPosition.CENTER, backgroundSize);
  6. layout1.setBackground(new Background(loginBack));
  7. layout1.getChildren().addAll(label1, button1, button2);
  8. Scene loginScene = new Scene(layout1,320, 480);
  9. primaryStage.setScene(loginScene);
  10. primaryStage.show();
RAW Paste Data