X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAquaInternalFrameManager.java;h=8ef204c832315f97adc2d9c202d8243da4f7bc88;hb=31714b90648bba773f68736b8c1700ae53805eee;hp=ea809eb5eb7a74eee1db676f0f5a55c089e8136c;hpb=0ca5a60ca575f0d0e6aeea158485f16cd61df082;p=jalview.git diff --git a/src/jalview/gui/AquaInternalFrameManager.java b/src/jalview/gui/AquaInternalFrameManager.java index ea809eb..8ef204c 100644 --- a/src/jalview/gui/AquaInternalFrameManager.java +++ b/src/jalview/gui/AquaInternalFrameManager.java @@ -60,7 +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 + * see com.sun.java.swing.plaf.windows.WindowsDesktopManager */ public class AquaInternalFrameManager extends DefaultDesktopManager { @@ -152,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) { @@ -254,4 +255,4 @@ public class AquaInternalFrameManager extends DefaultDesktopManager { switchFrame(false); } -} \ No newline at end of file +}