Z-order on Java Swing components

Bevin picture Bevin · Nov 19, 2010 · Viewed 31.4k times · Source

I've been looking all over for some mention of this, but I cannot find any substantial information on it. Is there a way to change the z-order of Swing components, or at least change the draw order so that they appear to be above others?

Answer

Amir Afghani picture Amir Afghani · Nov 19, 2010

You are looking for setComponentZOrder

Here's an example.