List of usage examples for javafx.scene.control Tooltip setTextOverrun
public final void setTextOverrun(OverrunStyle value)
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group()); stage.setWidth(300);/* w w w. j av a 2 s .c o m*/ stage.setHeight(150); Button button = new Button("Hover Over Me"); Tooltip toolTip = new Tooltip("Tooltip for Button"); toolTip.setTextOverrun(OverrunStyle.CENTER_ELLIPSIS); button.setTooltip(toolTip); ((Group) scene.getRoot()).getChildren().add(button); stage.setScene(scene); stage.show(); }