Java Swing - GUIs
TOPIC 03 – MORE ON COMPONENTS


 

LESSON WORK

 

QUESTION #1

 

Consider the GUI application that was created in the previous lesson with the four buttons for addition, subtraction, multiplication and division.

 

Copy your code to a new file and alter it to replace the four buttons by a Combo Box that selects the operation to be done.  Make sure your application still works.

QUESTION #2

 

Create your own JMenuBar inside of an application.  Make sure your menu bar has three menus at the top level and at least one submenu somewhere.  Each menu needs to contain at least two items.

 

You also need to have at least one JRadioButtonMenuItem and one JCheckBoxMenuItem.