Example usage for javafx.scene.control Tooltip fontProperty

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

Introduction

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

Prototype

public final ObjectProperty<Font> fontProperty() 

Source Link

Document

The default font to use for text in the Tooltip.

Usage

From source file:Main.java

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

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

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

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