Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main extends Application {
- private static final String BORDER_PANE_MAIN_FXML = "/fxml/MainBorderPane.fxml";
- private static final String BACKGROUND_PATH = "graphics/gallery_restaurant_04.jpg";
- public static void main(String[] args) {
- launch(args);
- }
- public void start(Stage primaryStage) throws Exception {
- Pane borderPane = FxmlUtils.fxmlLoader(BORDER_PANE_MAIN_FXML);
- borderPane.setBackground(new Background(new BackgroundImage(new Image(BACKGROUND_PATH), NO_REPEAT, NO_REPEAT, CENTER, DEFAULT)));
- Scene scene = new Scene(borderPane);
- primaryStage.setScene(scene);
- primaryStage.show();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement