package class4_2_JavaFXAndAnonymousInnerClasses; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.control.TextArea; import javafx.scene.control.TextField; import javafx.scene.effect.BoxBlur; import javafx.scene.layout.FlowPane; import javafx.scene.layout.Pane; import javafx.scene.layout.StackPane; import javafx.stage.Stage; public class Main4_NewControllers extends Application { private Label label; @Override public void start(Stage primaryStage) throws Exception{ Pane root = new FlowPane(); label = new Label("This is a lot of text that will show up on the screen!"); Button clickMe = new Button("Click Me!"); TextArea area = new TextArea(); TextField field = new TextField(); clickMe.setOnAction(e -> label.setText(area.getText())); root.getChildren().addAll(label, clickMe, area, field); primaryStage.setTitle("Hello World"); primaryStage.setScene(new Scene(root, 300, 50)); primaryStage.show(); } public static void main(String[] args) { launch(args); } }