You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The addMenu() method of MenuBar sets the menuBar of the menu: menu.setMenuBar(this);
The removeMenu() method tries to set the menuBar of a menu to null: menu.setMenuBar(null);
The menu checks in the seMenuBar() method that the menu has already been set before and throws an exception: if (this.menuBar != null) throw new IllegalStateException("Menu was already added to MenuBar");
Am I removing/adding the menu incorrectly or is this just an oversight?
The text was updated successfully, but these errors were encountered:
The addMenu() method of MenuBar sets the menuBar of the menu:
menu.setMenuBar(this);
The removeMenu() method tries to set the menuBar of a menu to null:
menu.setMenuBar(null);
The menu checks in the seMenuBar() method that the menu has already been set before and throws an exception:
if (this.menuBar != null) throw new IllegalStateException("Menu was already added to MenuBar");
Am I removing/adding the menu incorrectly or is this just an oversight?
The text was updated successfully, but these errors were encountered: