Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javafx Image and Text align on Button

Tags:

javafx-2

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?

like image 604
prs Avatar asked Dec 16 '22 07:12

prs


1 Answers

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

ContentDisplay

like image 137
agonist_ Avatar answered Dec 28 '22 09:12

agonist_