Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 842
Renoj Joseph Avatar asked Jan 19 '26 21:01

Renoj Joseph


1 Answers

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

 #mnAdmin > .label {
              -fx-graphic: url("../images/Admin-icon32.png");
              -fx-content-display:top;
        }
like image 64
Renoj Joseph Avatar answered Jan 22 '26 14:01

Renoj Joseph