X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAquaInternalFrameManager.java;h=8ef204c832315f97adc2d9c202d8243da4f7bc88;hb=682ebcd21b2123786463a3f56cc6f7c17f361bae;hp=829135b28cc53ef75c1f303c67f8504b123c3c20;hpb=14193747f3831242bc7dfac12394eb20eb0ba480;p=jalview.git diff --git a/src/jalview/gui/AquaInternalFrameManager.java b/src/jalview/gui/AquaInternalFrameManager.java index 829135b..8ef204c 100644 --- a/src/jalview/gui/AquaInternalFrameManager.java +++ b/src/jalview/gui/AquaInternalFrameManager.java @@ -60,6 +60,7 @@ import javax.swing.JInternalFrame; * around to the bottom of the window stack (as the original implementation * does) * + * see com.sun.java.swing.plaf.windows.WindowsDesktopManager */ public class AquaInternalFrameManager extends DefaultDesktopManager { @@ -151,11 +152,12 @@ public class AquaInternalFrameManager extends DefaultDesktopManager super.activateFrame(f); } - // If this is the first activation, add to child list. - if (fChildFrames.indexOf(f) == -1) + // add or relocate to top of stack + if (fChildFrames.indexOf(f) != -1) { - fChildFrames.addElement(f); + fChildFrames.remove(f); } + fChildFrames.addElement(f); if (fCurrentFrame != null && f != fCurrentFrame) { @@ -253,4 +255,4 @@ public class AquaInternalFrameManager extends DefaultDesktopManager { switchFrame(false); } -} \ No newline at end of file +}