Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package application;
- import javafx.fxml.FXML;
- import javafx.scene.control.Button;
- import javafx.scene.control.TextField;
- public class CounterController implements CountListener {
- @FXML
- private Button incrementButton;
- @FXML
- private TextField textFieldCount;
- private CounterObject counterObject = new CounterObject();
- @FXML public void incrementValue() {
- counterObject.increment();
- }
- public void initialize(){
- counterObject.addController(this);
- }
- @Override
- public void countChanged(CounterObject counterObject) {
- textFieldCount.setText(Integer.toString(counterObject.getCount()));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement