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

John Zukowski

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.)

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact