Javafx Image and Text align on Button

javafx-2

Solution

You have to use `button.setContentDisplay(ContentDisplay.TOP);`

ContentDisplay

Problem

I created a javafx button and added image and text.I want text place to top and image place to middle of the javafx button.Is it possible with javafx and how can I do it?

Original source