From: amwaterhouse Date: Wed, 8 Feb 2006 15:26:11 +0000 (+0000) Subject: Make URL input window bigger X-Git-Tag: Root_VamJalview_2_07b+~159 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8d056f642902ae55c05cde27742187ae55451421;p=jalview.git Make URL input window bigger --- diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index 6295801..a60d4e7 100755 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -391,16 +391,26 @@ public class Desktop extends jalview.jbgui.GDesktop */ public void inputURLMenuItem_actionPerformed(ActionEvent e) { - Object reply = JOptionPane.showInternalInputDialog(Desktop.desktop, - "Enter url of input file", "Input alignment from URL", - JOptionPane.QUESTION_MESSAGE, null, null, "http://www."); + // This construct allows us to have a wider textfield + // for viewing + JLabel label = new JLabel("Enter URL of Input File"); + JTextField textinput = new JTextField("http://www.", 40); + JPanel panel = new JPanel(new BorderLayout()); + panel.add(label, BorderLayout.NORTH); + panel.add(textinput, BorderLayout.SOUTH); - if (reply == null) + + int reply = JOptionPane.showInternalConfirmDialog(desktop, + panel, "Input Alignment From URL", + JOptionPane.OK_CANCEL_OPTION ); + + + if (reply != JOptionPane.OK_OPTION ) { return; } - String url = reply.toString().trim(); + String url = textinput.getText(); if (url.toLowerCase().endsWith(".jar")) {