functional/SceneGraphTests/src/test/fxapp/LifecycleApp.java

Print this page

        

*** 28,38 **** import javafx.application.Application; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.Group; import javafx.scene.Scene; ! import javafx.scene.control.ButtonBuilder; import javafx.stage.Stage; /** * * @author Sergey --- 28,38 ---- import javafx.application.Application; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.Group; import javafx.scene.Scene; ! import javafx.scene.control.Button; import javafx.stage.Stage; /** * * @author Sergey
*** 72,88 **** } System.out.println("Raw Parameters:"); for (String string : status.raw = getParameters().getRaw()) { System.out.println(string); } ! stage.setScene(new Scene(new Group(ButtonBuilder.create().text("close").onAction(new EventHandler<ActionEvent>() { ! public void handle(ActionEvent t) { stage.close(); } ! ! }).build()))); stage.show(); } @Override --- 72,89 ---- } System.out.println("Raw Parameters:"); for (String string : status.raw = getParameters().getRaw()) { System.out.println(string); } ! Button temp = new Button(); ! temp.setText("close"); ! temp.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent t) { stage.close(); } ! }); ! stage.setScene(new Scene(new Group(temp))); stage.show(); } @Override