Write code to create a new menu item named aChoice that has the label "Exit".
Suppose you are defining a class called MenuGUI that is a derived class of the
class JFrame. Write code to add the menu item mItem to the menu m. Then
add m to the menu bar mBar, and then add the menu bar to the JFrame
MenuGUI. Assume that this all takes place inside a constructor for MenuGUI.
Also assume that everything has already been constructed with new, and that all
necessary listeners are registered. You just need to do the adding
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here