From 8d056f642902ae55c05cde27742187ae55451421 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Wed, 8 Feb 2006 15:26:11 +0000 Subject: [PATCH] Make URL input window bigger --- src/jalview/gui/Desktop.java | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) 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")) { -- 1.7.10.2