Example usage for javafx.scene.control Tooltip setContentDisplay

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

Introduction

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

Prototype

public final void setContentDisplay(ContentDisplay value) 

Source Link

Usage

From source file:Main.java

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

    Button button = new Button("Hover Over Me");
    Tooltip toolTip = new Tooltip();
    toolTip.setContentDisplay(ContentDisplay.BOTTOM);

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

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