From 1ee3386743590a8b6d98f6c8839eae1b390c7f3b Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Wed, 21 Sep 2005 17:07:57 +0000 Subject: [PATCH] Next active Frame losing focus bug fixed --- src/jalview/gui/Desktop.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index 99b24d3..037a7a9 100755 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -187,6 +187,9 @@ public class Desktop extends jalview.jbgui.GDesktop { openFrameCount--; windowMenu.remove(menuItem); + JInternalFrame itf = desktop.getSelectedFrame(); + if (itf != null) + itf.requestFocus(); } ; }); @@ -364,17 +367,18 @@ public class Desktop extends jalview.jbgui.GDesktop */ public void inputURLMenuItem_actionPerformed(ActionEvent e) { - String url = JOptionPane.showInternalInputDialog(Desktop.desktop, + Object reply = JOptionPane.showInternalInputDialog(Desktop.desktop, "Enter url of input file", "Input alignment from URL", - JOptionPane.QUESTION_MESSAGE, null, null, "http://www.") - .toString(); + JOptionPane.QUESTION_MESSAGE, null, null, "http://www."); - if (url == null) + if (reply == null) { return; } - if (url.trim().toLowerCase().endsWith(".jar")) + String url = reply.toString().trim(); + + if (url.toLowerCase().endsWith(".jar")) { jalview.bin.Cache.setProperty("DEFAULT_FILE_FORMAT", "Jalview"); Jalview2XML.LoadJalviewAlign(url); -- 1.7.10.2