diff --git a/src/zutil/log/net/NetLogClientInstance.fxml b/src/zutil/log/net/NetLogClientInstance.fxml index 65aadaf..66cfac8 100644 --- a/src/zutil/log/net/NetLogClientInstance.fxml +++ b/src/zutil/log/net/NetLogClientInstance.fxml @@ -33,6 +33,9 @@ --> + + + @@ -81,9 +84,6 @@ - - - diff --git a/src/zutil/log/net/NetLogGuiClientInstance.java b/src/zutil/log/net/NetLogGuiClientInstance.java index 6942b09..59187c8 100644 --- a/src/zutil/log/net/NetLogGuiClientInstance.java +++ b/src/zutil/log/net/NetLogGuiClientInstance.java @@ -27,6 +27,7 @@ import java.util.ResourceBundle; import java.util.logging.Level; import java.util.logging.Logger; +import javafx.application.Platform; import javafx.scene.control.*; import zutil.log.LogUtil; @@ -100,7 +101,13 @@ public class NetLogGuiClientInstance implements Initializable, NetLogListener { public void handleLogMessage(NetLogMessage msg) { if(status == Status.RUNNING){ logTable.getItems().add(msg); - logCountLabel.setText(""+Integer.parseInt(logCountLabel.getText())+1); + + Platform.runLater(new Runnable() { + @Override + public void run() { + logCountLabel.setText("" + (Long.parseLong(logCountLabel.getText()) + 1)); + } + }); } }