There is no easy way to do this. The menu ignores layout configuration and always uses vbox . To display it horizontally, you must override initComponent to make it possible to switch between hbox and vbox . When you select hbox , the items will be displayed horizontally, but the size will remain the same as in vbox. Thus, you also need to do something with calibration - for this you must override the doConstrain method.
source share