Examples of showAndWait()


Examples of javafx.stage.Stage.showAndWait()

          Stage stage = new Stage(StageStyle.UTILITY);
          stage.setTitle("Hello there");
          stage.initModality(Modality.APPLICATION_MODAL);
          stage.setScene(scene);
          stage.sizeToScene();
          stage.showAndWait();
        }
      })
      .start();
  }
 
View Full Code Here

Examples of javafx.stage.Stage.showAndWait()

        public void handle(WindowEvent ev) {
          sizeReasonably((Stage) ev.getSource(), parent);
        }
      });

      stage.showAndWait();
    }
   
    /**
     * Displays a modal dialog in a Swing context with the specified parent frame.
     * <p>
 
View Full Code Here

Examples of javafx.stage.Stage.showAndWait()

        FXMLLoader loader = new FXMLLoader(GuiUtils.class.getResource("alert.fxml"));
        Pane pane = evalUnchecked(() -> (Pane) loader.load());
        AlertWindowController controller = loader.getController();
        setup.accept(dialogStage, controller);
        dialogStage.setScene(new Scene(pane));
        dialogStage.showAndWait();
    }

    public static void crashAlert(Throwable t) {
        t.printStackTrace();
        Throwable rootCause = Throwables.getRootCause(t);
View Full Code Here

Examples of javafx.stage.Stage.showAndWait()

            final SettingsController settingsController = fxmlLoader.getController();
            settingsController.initialize(launcherDirectory, downloadDirectory, launcherSettings, gameVersions, settingsStage);

            Scene scene = new Scene(root);
            settingsStage.setScene(scene);
            settingsStage.showAndWait();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            updateJobBox();
            updateGui();
View Full Code Here

Examples of javafx.stage.Stage.showAndWait()

            dialogStage.setScene(scene);
           
            AboutUsDialogController controller = loader.getController();
            controller.setDialogStage(dialogStage);
           
            dialogStage.showAndWait();
           
   
        }catch (IOException e){
            e.printStackTrace();
        }
View Full Code Here

Examples of javafx.stage.Stage.showAndWait()

            FXMLLoader loader = new FXMLLoader(GuiUtils.class.getResource("alert.fxml"));
            Pane pane = loader.load();
            AlertWindowController controller = loader.getController();
            setup.accept(dialogStage, controller);
            dialogStage.setScene(new Scene(pane));
            dialogStage.showAndWait();
        } catch (Throwable e) {
            // We crashed whilst trying to show the alert dialog. This can happen if we're being crashed by inbound
            // closures onto the event thread which will execute in the nested event loop. Just give up here: at the
            // moment we have no way to filter them out of the event queue.
            e.printStackTrace();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.