Components and Zorder

Initial versions of the AWT made no guarantees about the depth, or zorder,[5] of components. With the advent of the 1.1 release of the AWT, zorder is defined to be the same as the order in which components are added to their containers, from front to back. The first component added to a container is the frontmost component, and the last component added will be displayed behind all other components in the component's container.

[5] The term zorder comes from three-dimensional coordinate systems, where the z axis represents the third dimension.

The applet shown in Figure 11-1 contains six buttons added to the applet in numerical order, starting with Button 1 and ending with Button 6. Although there is currently no support for ...

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.