Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8095984

[ToolTip] Tooltip not showing text when wrapText enabled

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: 8
    • Fix Version/s: 8u20
    • Component/s: javafx
    • Labels:

      Description

      Run this sample

      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.Label;
      import javafx.scene.control.Tooltip;
      import javafx.scene.layout.HBox;
      import javafx.stage.Stage;

      public class HelloTooltip extends Application {
        
          public static void main(String[] args) {
              Application.launch(args);
          }

          @Override public void start(Stage stage) {
              Label label = new Label("Test");
              Tooltip tooltip = new Tooltip("1");
              tooltip.setWrapText(true);

              label.setTooltip(tooltip);

              HBox box = new HBox(label);
              Scene scene = new Scene(box);
              stage.setScene(scene);
              stage.show();
          }
      }

      Let your mouse on the Tooltip, you will see that the number one is not showing. If you deactivate the wrapText or you enter more that one character in the Tooltip, the problem is gone.

      Any idea?

      Work around right now is not to wrap the text when only one character is present.

        Attachments

          Activity

            People

            • Assignee:
              jgiles Jonathan Giles
              Reporter:
              shadzic Samir Hadzic
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: