Using Tooltip#setWrapText(true) will only have any effect if Tooltip#setPrefWidth() is also called - otherwise, it will just overrun any text large enough.
While this is a somewhat desirable behavior in other Labeled controls, it will result in having a large empty space when the text is small so one can have a large text wrapped properly (think of a ListCell with editable content, for instance: when the text is small, you want the tooltip to show it and have no extra space. When it's large, you want it to wrap so the user can read it entirely if it's being overrun in the cell).
The suggested behavior is either
- Wrapping using maxWidth; or
- Having a method like Text#setWrappingWidth()
While this is a somewhat desirable behavior in other Labeled controls, it will result in having a large empty space when the text is small so one can have a large text wrapped properly (think of a ListCell with editable content, for instance: when the text is small, you want the tooltip to show it and have no extra space. When it's large, you want it to wrap so the user can read it entirely if it's being overrun in the cell).
The suggested behavior is either
- Wrapping using maxWidth; or
- Having a method like Text#setWrappingWidth()