O'Reilly logo

Graphic Java™ 1.2, Volume I: AWT, Third Edition by David M. Geary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

Menubars and menus are easy to create and display in the AWT; however, there is a certain amount of drudgery that every application with a menubar must implement. We have encapsulated that drudgery in a FrameWithMenuBar class that is extended by most of the example applications in this chapter. We have also presented a general-utility class, MenuBarPrinter, that prints each menu and menu item contained in a menubar.

Tear-off menus are supported by the AWT. A menu is designated as a tear-off menu at construction time by passing an additional boolean argument being passed to a Menu constructor; a true value indicates that the menu is to be a tear-off; a false value indicates that the menu is not a tear-off. Tear-off menus are not supported ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required