java-tutorials/javafx/src/main/resources/button_event-handler.fxml
AttilaUhrin c81fe2f74e [BAEL-3946] Javafx adding ActionListener to button (#11701)
* Add implementation for article.

* Add new line at the end of FXML layout file.

* Remove default prefWidth from button, convert eventHandler to lambda.

* Fix FXML file formatting.
2022-01-25 06:49:12 +01:00

17 lines
489 B
XML

<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<BorderPane xmlns:fx="http://javafx.com/fxml"
xmlns="http://javafx.com/javafx"
fx:controller="com.baeldung.button.eventhandler.ButtonEventHandlerController"
prefHeight="200.0" prefWidth="300.0">
<center>
<Button fx:id="button" HBox.hgrow="ALWAYS"/>
</center>
<bottom>
<Label fx:id="label" text="Test label"/>
</bottom>
</BorderPane>