I am using Menu with a localized label/text.
Currently I do it this way:
Menu menu = new Menu(null);
menu.textProperty().bind(someProperty());
I do it similarly with MenuItem:
MenuItem menuItem = new MenuItem();
menuItem.textProperty().bind(someOtherProperty());
The need for a String in Menu's constructor is a little bit annoying here.
I suggest you provide a default constructor with no parameters. (as you did with MenuItem, too)
Currently I do it this way:
Menu menu = new Menu(null);
menu.textProperty().bind(someProperty());
I do it similarly with MenuItem:
MenuItem menuItem = new MenuItem();
menuItem.textProperty().bind(someOtherProperty());
The need for a String in Menu's constructor is a little bit annoying here.
I suggest you provide a default constructor with no parameters. (as you did with MenuItem, too)
- duplicates
-
JDK-8101923 Menu with empty Constructor
-
- Closed
-