示例#1
0
文件: Main.java 项目: garzoc/group17
  @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);
    }
  }
示例#2
0
 @Override
 public void start(Stage stage) {
   stage.setScene(new MainScene(stage));
   stage.setTitle("Мой бюджет");
   stage.show();
 }