-1

I want to create text under the cursor in my javafx application. It should look like this. How do I do this?

1 Answers1

1

JavaFX Tooltip is the UI component used to display additional information for another component when you move the mouse over the surface of the component.

TextField field_userName= new TextField();

Tooltip tooltip_userName=new Tooltip("Enter user name");

// Set tooltip
field_userName.setTooltip(tooltip_userName);

// Or using Tooltip.install
Tooltip.install(field_userName, tooltip_userName);

// Uninstall tooltip
Tooltip.uninstall(field_userName, tooltip_userName);
Aakash Verma
  • 3,705
  • 5
  • 29
  • 66