package io.bisq.gui.components;

import javafx.scene.control.Labeled;
import javafx.scene.control.SkinBase;
import javafx.scene.control.Tooltip;
import javafx.scene.text.Text;

public class TooltipUtil {

    public static void showTooltipIfTruncated(SkinBase skinBase, Labeled labeled) {
        for (Object node : skinBase.getChildren()) {
            if (node instanceof Text) {
                String displayedText = ((Text) node).getText();
                if (displayedText.equals(labeled.getText())) {
                    if (labeled.getTooltip() != null) {
                        labeled.setTooltip(null);
                    }
                } else if (labeled.getText() != null){
                    labeled.setTooltip(new Tooltip(labeled.getText()));
                }
            }
        }
    }
}

@@ -439,16 +439,76 @@
 Text();%0A
+                String untruncatedText = labeled.getText();%0A
         
@@ -540,33 +540,31 @@
 .equals(
-labeled.get
+untruncated
 Text
-()
 )) %7B%0A   
@@ -719,33 +719,31 @@
 if (
-labeled.get
+untruncated
 Text
-()
  != null
 )%7B%0A 
@@ -738,16 +738,53 @@
  != null
+ && !untruncatedText.trim().isEmpty()
 )%7B%0A     
@@ -829,33 +829,31 @@
 Tooltip(
-labeled.get
+untruncated
 Text
-()
 ));%0A    

Add empty string check to prevent tooltip creation for empty strings