Javafx Menu – Text under icon


In my JavaFX project, I am trying to add an icon on Menu(mnAdmin) in the MenuBar using the CSS code below

#mnAdmin > .label {
          -fx-graphic: url("../images/Admin-icon32.png");

and am getting the icon beside the text and I would like to get the text at the bottom of the icon.

What I am getting now
What would like to get

Is there any way to get it?


As suggested by kleopatra modified the code as stated below and it works well.

 #mnAdmin > .label {
              -fx-graphic: url("../images/Admin-icon32.png");

Answered By – Renoj Joseph

Answer Checked By – Marilyn (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.