How can I control the Z-order that my overlapping components are drawn in?

AWT does not define z-order behavior. In fact, it is different on different platforms. You would need to draw all the components yourself, instead of relying on the Container to do this for you.

If you are using Swing, you can place your components inside a JLayeredPane and assign each a layer number. Higher layer numbers appear on top of lower layer numbers. (Note that JDesktopPane is a layered pane; each JInternalFrame can be at different layers.)

Advertiser Disclosure:
Some of the products that appear on this site are from companies from which QuinStreet receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. QuinStreet does not include all companies or all types of products available in the marketplace.