daily pastebin goal
63%
SHARE
TWEET

Untitled

a guest Jan 24th, 2019 137 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Main extends Application {
  2.  
  3.     private static final String BORDER_PANE_MAIN_FXML = "/fxml/MainBorderPane.fxml";
  4.     private static final String BACKGROUND_PATH = "graphics/gallery_restaurant_04.jpg";
  5.  
  6.     public static void main(String[] args) {
  7.         launch(args);
  8.     }
  9.  
  10.     public void start(Stage primaryStage) throws Exception {
  11.  
  12.         Pane borderPane = FxmlUtils.fxmlLoader(BORDER_PANE_MAIN_FXML);
  13.         borderPane.setBackground(new Background(new BackgroundImage(new Image(BACKGROUND_PATH), NO_REPEAT, NO_REPEAT, CENTER, DEFAULT)));
  14.         Scene scene = new Scene(borderPane);
  15.         primaryStage.setScene(scene);
  16.         primaryStage.show();
  17.  
  18.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top