Java Reference
In-Depth Information
30.
menuFrame.disableTest();
menuFrame.setText("Item \ "Test \ "inMenu 1 disabled.");
31.
32.
}
33.
else {
34.
System.out.println("ERROR: unknown action command.");
35.
}
36.
}
37.
}
Exercise
8.1
Construct a GUI consisting of a frame with a menu and an embedded panel.
The menu has three items 'Red', 'Blue' and 'Yellow'. When a menu item is
selected, the background colour of the panel is changed accordingly.
Search WWH ::




Custom Search