From da90bfee499eab087a5d5fb582f16b4d0a05449f Mon Sep 17 00:00:00 2001 From: Konrad Neitzel Date: Mon, 6 May 2024 12:50:24 +0200 Subject: [PATCH] Updated dependencies, activates PMD Plugin again: new version supports Java 21. --- pom.xml | 20 ++++++++++-------- src/main/java/de/kneitzel/MainWindow.java | 21 +++++++++++-------- .../resources/de/kneitzel/MainWindow.fxml | 2 +- 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/pom.xml b/pom.xml index ff50573..1f6f0bd 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ ${project.artifactId}-${project.version} - 19.0.2.1 + 21.0.3 24.1.0 5.10.2 1.18.32 @@ -33,20 +33,20 @@ 3.3.2 3.13.0 3.6.1 - 3.1.1 + 3.1.2 3.4.1 - 3.1.1 - 3.3.0 + 3.1.2 + 3.4.1 3.3.1 4.0.0-M13 3.2.5 1.0.0.RC2 0.1.5 - 3.21.2 + 3.22.0 2.16.2 0.0.8 - 4.8.3.1 - 4.8.3 + 4.8.5.0 + 4.8.5 UTF-8 @@ -236,7 +236,6 @@ - pmd + + + - --> org.codehaus.mojo diff --git a/src/main/java/de/kneitzel/MainWindow.java b/src/main/java/de/kneitzel/MainWindow.java index 4398a1b..fd731f4 100644 --- a/src/main/java/de/kneitzel/MainWindow.java +++ b/src/main/java/de/kneitzel/MainWindow.java @@ -3,7 +3,6 @@ package de.kneitzel; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.fxml.Initializable; -import javafx.scene.control.Button; import javafx.scene.control.TextField; import java.net.URL; @@ -11,20 +10,24 @@ import java.util.ResourceBundle; public class MainWindow implements Initializable { + + private int counter = 0; + @FXML private TextField textField; - public Button button; + @Override - public void initialize(URL url, ResourceBundle resourceBundle) { - if (button == null) { - textField.setText("Button is null"); - } else { - textField.setText("Button is not null"); - } + public void initialize(URL location, ResourceBundle resources) { + displayCounter(); + } + + private void displayCounter() { + textField.setText("Click counter: " + counter); } @FXML private void onButtonClick(ActionEvent actionEvent) { - + counter++; + displayCounter(); } } diff --git a/src/main/resources/de/kneitzel/MainWindow.fxml b/src/main/resources/de/kneitzel/MainWindow.fxml index 07c63e6..3b6f267 100644 --- a/src/main/resources/de/kneitzel/MainWindow.fxml +++ b/src/main/resources/de/kneitzel/MainWindow.fxml @@ -5,7 +5,7 @@ -