Article From:https://segmentfault.com/q/1010000012144051
Question:
 MenuItem a = new MenuItem("a");     
 MenuItem b= new MenuItem("b");
 MenuButton aa = new MenuButton();
 MenuButton bb = new MenuButton();
 aa.getItems.addAll(a,b);
 bb.getItems.addAll(a,b);
 

The result is that the BB button shows two options a, B; however, the AA button does not have any options. Change to as follows:

 aa.getItems.addAll(a,b);
 bb.getItems.addAll(b);

Then there is a in AA, no B option, and only B option in Bb.

Answer 0:

It’s settled in Stackoverflow.

Leave a Reply

Your email address will not be published. Required fields are marked *