Example #1
0
  @Override
  public void start(Stage primaryStage) {
    try {
      TabPane page = (TabPane) FXMLLoader.load(Main.class.getResource("simple.fxml"));
      Scene scene = new Scene(page);
      primaryStage.setScene(scene);
      primaryStage.setTitle("Hotels");
      primaryStage.show();

      textf = (TextField) scene.lookup("#HotelNameTextb");
      Button create = (Button) scene.lookup("#CreateButton");
      create.setOnAction(this::handleButtonAction);

    } catch (Exception ex) {
      Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
    }
  }
Example #2
0
 @Override
 public void start(Stage stage) {
   stage.setScene(new MainScene(stage));
   stage.setTitle("Мой бюджет");
   stage.show();
 }