Reputation: 83
I want to make error message like this on JavaFX. How can I do it?
Upvotes: 8
Views: 16856
Reputation: 7255
~~>Default Way
Alert class and some more are already in JavaFX library a full tutorial here
How to costumize an Alert?Here
^^Using ControlsFX library^^
There is a ready JavaFX library that make messages like in your icon.I am talking about ControlsFX library
~~>More Costumizable
It contains a Class named NotificationPane which you can modify in the way you want to display messages like JavaFX Alert
and more complicated.
~~>For your situation
I would use Notifications class which display messages in the bootom,top,right,left and combination of them in the screen.
Example Code:
Notifications.create() .title("Title Text") .text("Hello World 0!") .showWarning();
Image:
Look here Edit this cause for some reason isn't displayed in stackoverflow
~~>How to costumize Notifications:
Customize ControlsFX Notifications
Upvotes: 4