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 ...
Get Graphic Java™ 1.2, Volume I: AWT, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.