Example usage for javafx.scene.control Tooltip contentDisplayProperty

List of usage examples for javafx.scene.control Tooltip contentDisplayProperty

Introduction

In this page you can find the example usage for javafx.scene.control Tooltip contentDisplayProperty.

Prototype

public final ObjectProperty<ContentDisplay> contentDisplayProperty() 

Source Link

Document

Specifies the positioning of the graphic relative to the text.

Usage

From source file:Main.java

@Override
public void start(Stage stage) {
    Scene scene = new Scene(new Group());
    stage.setWidth(300);//from  w w  w .  j a  va  2 s  .c  om
    stage.setHeight(150);

    Button button = new Button("Hover Over Me");
    Tooltip toolTip = new Tooltip("Tooltip for Button");
    System.out.println(toolTip.contentDisplayProperty());
    button.setTooltip(toolTip);

    ((Group) scene.getRoot()).getChildren().add(button);

    stage.setScene(scene);
    stage.show();
}