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

Tear-off Menus

Tear-off menus are implemented under Motif and are menus that, as their name implies, can be torn off and placed aside for quick access. Tear-off menus have aperforated line at the top of the menu. Once torn off, they are placed in their own window, as illustrated in Figure 17-3.

Figure 17-3. Tear-off Menu. The left picture shows the perforated tear-off menu. The right picture shows the menu after it is torn off.

The Menu class provides a constructor that allows you to specify whether the menu is a tear-off menu. This constructor is invoked in Example 17-2 and is passed true as the second argument. The true argument Doing so indicates ...

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