client/ftpd/src/se/lu/thep/coreftpd/ftp_server/FTPMessages.java

Code
Comments
Other
Rev Date Author Line
741 10 Oct 06 olle 1 /*
1652 22 May 07 gregory 2  $Id$
741 10 Oct 06 olle 3
1916 31 Aug 07 jari 4  Copyright (C) 2006 Olle Mansson
1916 31 Aug 07 jari 5  Copyright (C) 2007 Gregory Vincic
741 10 Oct 06 olle 6
1652 22 May 07 gregory 7  This file is part of Proteios.
1652 22 May 07 gregory 8  Available at http://www.proteios.org/
741 10 Oct 06 olle 9
1652 22 May 07 gregory 10  Proteios is free software; you can redistribute it and/or modify it
1652 22 May 07 gregory 11  under the terms of the GNU General Public License as published by
1652 22 May 07 gregory 12  the Free Software Foundation; either version 2 of the License, or
1652 22 May 07 gregory 13  (at your option) any later version.
741 10 Oct 06 olle 14
1652 22 May 07 gregory 15  Proteios is distributed in the hope that it will be useful, but
1652 22 May 07 gregory 16  WITHOUT ANY WARRANTY; without even the implied warranty of
1652 22 May 07 gregory 17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1652 22 May 07 gregory 18  General Public License for more details.
741 10 Oct 06 olle 19
1652 22 May 07 gregory 20  You should have received a copy of the GNU General Public License
1652 22 May 07 gregory 21  along with this program; if not, write to the Free Software
1652 22 May 07 gregory 22  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1652 22 May 07 gregory 23  02111-1307, USA.
1652 22 May 07 gregory 24  */
741 10 Oct 06 olle 25
741 10 Oct 06 olle 26 //  Xerver Free Web Server
741 10 Oct 06 olle 27 //  Copyright (C) 2002-2005 Omid Rouhani
741 10 Oct 06 olle 28 //
741 10 Oct 06 olle 29 //
741 10 Oct 06 olle 30 //  This program is free software; you can redistribute it and/or
741 10 Oct 06 olle 31 //  modify it under the terms of the GNU General Public License
741 10 Oct 06 olle 32 //  as published by the Free Software Foundation; either version 2
741 10 Oct 06 olle 33 //  of the License, or (at your option) any later version.
741 10 Oct 06 olle 34 //
741 10 Oct 06 olle 35 //  This program is distributed in the hope that it will be useful,
741 10 Oct 06 olle 36 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
741 10 Oct 06 olle 37 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
741 10 Oct 06 olle 38 //  GNU General Public License for more details.
741 10 Oct 06 olle 39 //
741 10 Oct 06 olle 40 //  You should have received a copy of the GNU General Public License
741 10 Oct 06 olle 41 //  along with this program; if not, write to the Free Software
741 10 Oct 06 olle 42 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
741 10 Oct 06 olle 43 //
741 10 Oct 06 olle 44 //
741 10 Oct 06 olle 45 //  #############################################################
741 10 Oct 06 olle 46 //  ##  YOU CAN CONTACT THE AUTHOR (OMID ROUHANI) AT:          ##
741 10 Oct 06 olle 47 //  ##  HTTP://WWW.JAVASCRIPT.NU/XERVER/                       ##
741 10 Oct 06 olle 48 //  ##                                                         ##
741 10 Oct 06 olle 49 //  ##  IF YOUR SOFTWARE IS NOT RELEASED UNDER THE             ##
741 10 Oct 06 olle 50 //  ##  GNU GENERAL PUBLIC LICENSE (GPL),                      ##
741 10 Oct 06 olle 51 //  ##  PLEASE DO NOT COPY ANYTHING FROM THIS SOURCE CODE!!!   ##
741 10 Oct 06 olle 52 //  ##                                                         ##
741 10 Oct 06 olle 53 //  ##  FOR FULL LICENSE, PLEASE READ "XERVER LICENSE".        ##
741 10 Oct 06 olle 54 //  #############################################################
741 10 Oct 06 olle 55
1652 22 May 07 gregory 56 package se.lu.thep.coreftpd.ftp_server;
741 10 Oct 06 olle 57
791 23 Oct 06 olle 58 import se.lu.thep.coreftpd.common.GUIMethods;
791 23 Oct 06 olle 59 import se.lu.thep.coreftpd.common.HostInfo;
791 23 Oct 06 olle 60 import se.lu.thep.coreftpd.webserver.MenuOptions;
791 23 Oct 06 olle 61 import se.lu.thep.coreftpd.webserver.ProgramWindow;
741 10 Oct 06 olle 62 import java.awt.BorderLayout;
741 10 Oct 06 olle 63 import java.awt.Color;
741 10 Oct 06 olle 64 import java.awt.Container;
741 10 Oct 06 olle 65 import javax.swing.BoxLayout;
741 10 Oct 06 olle 66 import javax.swing.JLabel;
741 10 Oct 06 olle 67 import javax.swing.JTextField;
741 10 Oct 06 olle 68
741 10 Oct 06 olle 69 /**
1652 22 May 07 gregory 70  * 
1652 22 May 07 gregory 71  * <B>About this class:</B> <BR>
1652 22 May 07 gregory 72  * This class only contains static methods. It returns Containers with texts
1652 22 May 07 gregory 73  * such as "FTP server started", "FTP setup shut down" etc. which are used in
1652 22 May 07 gregory 74  * the Swing mode of Xerver.
1652 22 May 07 gregory 75  * 
741 10 Oct 06 olle 76  * @author <a href="http://www.JavaScript.nu/xerver/" TARGET="_top">Omid Rouhani</a>
741 10 Oct 06 olle 77  * @version 1.0
741 10 Oct 06 olle 78  */
741 10 Oct 06 olle 79
1652 22 May 07 gregory 80 public class FTPMessages extends GUIMethods {
1652 22 May 07 gregory 81   public static final int START_FTP = 0;
741 10 Oct 06 olle 82
1652 22 May 07 gregory 83   public static final int STOP_FTP = 1;
741 10 Oct 06 olle 84
1652 22 May 07 gregory 85   public static final int START_FTP_SETUP = 2;
1652 22 May 07 gregory 86
1652 22 May 07 gregory 87   public static final int STOP_FTP_SETUP = 3;
1652 22 May 07 gregory 88
1652 22 May 07 gregory 89   public static final int SERVER_PORT_IN_USE = 4;
1652 22 May 07 gregory 90
1652 22 May 07 gregory 91   public static final int SETUP_PORT_IN_USE = 5;
1652 22 May 07 gregory 92
1652 22 May 07 gregory 93   public static final int SERVER_PORT_ERROR = 6;
1652 22 May 07 gregory 94
1652 22 May 07 gregory 95   public static final int SETUP_PORT_ERROR = 7;
1652 22 May 07 gregory 96
1652 22 May 07 gregory 97   public static Container getContainer(int show) {
1652 22 May 07 gregory 98     switch (show) {
1652 22 May 07 gregory 99     case START_FTP:
1652 22 May 07 gregory 100       return showStartFTP();
1652 22 May 07 gregory 101     case STOP_FTP:
1652 22 May 07 gregory 102       return showStopFTP();
1652 22 May 07 gregory 103     case START_FTP_SETUP:
1652 22 May 07 gregory 104       return showStartFTPSetup();
1652 22 May 07 gregory 105     case STOP_FTP_SETUP:
1652 22 May 07 gregory 106       return showStopFTPSetup();
1652 22 May 07 gregory 107     case SERVER_PORT_IN_USE:
1652 22 May 07 gregory 108       return showServerPortInUse();
1652 22 May 07 gregory 109     case SETUP_PORT_IN_USE:
1652 22 May 07 gregory 110       return showSetupPortInUse();
1652 22 May 07 gregory 111     case SERVER_PORT_ERROR:
1652 22 May 07 gregory 112       return showServerPortError();
1652 22 May 07 gregory 113     case SETUP_PORT_ERROR:
1652 22 May 07 gregory 114       return showSetupPortError();
741 10 Oct 06 olle 115     }
741 10 Oct 06 olle 116     return null;
741 10 Oct 06 olle 117   }
741 10 Oct 06 olle 118
1652 22 May 07 gregory 119   private static Container showStartFTP() {
1652 22 May 07 gregory 120     Container cont = new Container();
741 10 Oct 06 olle 121     cont.setLayout(new BorderLayout());
741 10 Oct 06 olle 122
741 10 Oct 06 olle 123     JTextField addressInfo;
741 10 Oct 06 olle 124     JTextField addressInfo2;
741 10 Oct 06 olle 125     JLabel txtAboveIP;
741 10 Oct 06 olle 126     JLabel txtAboveIP2;
741 10 Oct 06 olle 127
1652 22 May 07 gregory 128     Container theFields = new Container();
741 10 Oct 06 olle 129     theFields.setLayout(new BoxLayout(theFields, BoxLayout.Y_AXIS));
741 10 Oct 06 olle 130
1652 22 May 07 gregory 131     txtAboveIP = new JLabel("Your server's outer IP is:");
1652 22 May 07 gregory 132     String s_outerIP = HostInfo.getIPFromInternet(); // Returns null if
1652 22 May 07 gregory 133                               // not detected
1652 22 May 07 gregory 134     if (s_outerIP != null) {
1652 22 May 07 gregory 135       addressInfo = new JTextField(s_outerIP, 17);
1652 22 May 07 gregory 136     } else {
1652 22 May 07 gregory 137       addressInfo = new JTextField("IP could not be detected!", 17);
741 10 Oct 06 olle 138     }
741 10 Oct 06 olle 139
1652 22 May 07 gregory 140     txtAboveIP2 = new JLabel("Your server's local IP is:  ");
1652 22 May 07 gregory 141     addressInfo2 = new JTextField(HostInfo.getLocalIPorLocalhost(), 17);
741 10 Oct 06 olle 142
1652 22 May 07 gregory 143     theFields.add(MenuOptions.make2ContainersTo1ContainerBeside(new JLabel(
1652 22 May 07 gregory 144         "Xerver Free FTP Server has been started!"),
1652 22 May 07 gregory 145         ProgramWindow.EMPTY_JLABEL));
741 10 Oct 06 olle 146     theFields.add(new JLabel(" "));
1652 22 May 07 gregory 147     theFields.add(MenuOptions.make2ContainersTo1ContainerBeside(MenuOptions
1652 22 May 07 gregory 148         .make2ContainersTo1ContainerAbove(txtAboveIP, MenuOptions
1652 22 May 07 gregory 149             .make2ContainersTo1ContainerBeside(addressInfo,
1652 22 May 07 gregory 150                 ProgramWindow.aboutOuterIPButton)),
1652 22 May 07 gregory 151         ProgramWindow.EMPTY_JLABEL));
741 10 Oct 06 olle 152     theFields.add(new JLabel(" "));
1652 22 May 07 gregory 153     theFields.add(MenuOptions.make2ContainersTo1ContainerBeside(MenuOptions
1652 22 May 07 gregory 154         .make2ContainersTo1ContainerAbove(txtAboveIP2, MenuOptions
1652 22 May 07 gregory 155             .make2ContainersTo1ContainerBeside(addressInfo2,
1652 22 May 07 gregory 156                 ProgramWindow.aboutLocalIPButton)),
1652 22 May 07 gregory 157         ProgramWindow.EMPTY_JLABEL));
741 10 Oct 06 olle 158     theFields.add(new JLabel(" "));
1652 22 May 07 gregory 159     theFields.add(MenuOptions.make2ContainersTo1ContainerBeside(new JLabel(
1652 22 May 07 gregory 160         "Server is running on port " + FTPServerController.getPort()
1652 22 May 07 gregory 161             + "."), ProgramWindow.EMPTY_JLABEL));
741 10 Oct 06 olle 162
1652 22 May 07 gregory 163     /*
1652 22 May 07 gregory 164      * theFields.add(new JLabel("Xerver Free FTP Server has been
1652 22 May 07 gregory 165      * started!")); theFields.add(ProgramWindow.EMPTY_JLABEL);
1652 22 May 07 gregory 166      * theFields.add(new JLabel("Your server's outer IP is:"));
1652 22 May 07 gregory 167      * theFields.add(MenuOptions.make2ContainersTo1ContainerBeside(MenuOptions.make2ContainersTo1ContainerBeside(addressInfo,ProgramWindow.aboutOuterIPButton),ProgramWindow.EMPTY_JLABEL));
1652 22 May 07 gregory 168      * theFields.add(ProgramWindow.EMPTY_JLABEL); theFields.add(new
1652 22 May 07 gregory 169      * JLabel("Your server's local IP is:"));
1652 22 May 07 gregory 170      * theFields.add(MenuOptions.make2ContainersTo1ContainerBeside(MenuOptions.make2ContainersTo1ContainerBeside(addressInfo2,ProgramWindow.aboutLocalIPButton),ProgramWindow.EMPTY_JLABEL));
1652 22 May 07 gregory 171      * theFields.add(ProgramWindow.EMPTY_JLABEL); theFields.add(new
1652 22 May 07 gregory 172      * JLabel("Server is running on port
1652 22 May 07 gregory 173      * "+FTPServerController.getIP()+"."));
1652 22 May 07 gregory 174      */
741 10 Oct 06 olle 175
1652 22 May 07 gregory 176     cont.add(MenuOptions
1652 22 May 07 gregory 177         .make2ContainersTo1ContainerAbove(MenuOptions
1652 22 May 07 gregory 178             .make2ContainersTo1ContainerBeside(theFields,
1652 22 May 07 gregory 179                 ProgramWindow.EMPTY_JLABEL),
1652 22 May 07 gregory 180             ProgramWindow.EMPTY_JLABEL), BorderLayout.CENTER);
1652 22 May 07 gregory 181     // Cont.add(MenuOptions.make2ContainersTo1ContainerAbove(MenuOptions.make2ContainersTo1ContainerBeside(MenuOptions.make2ContainersTo1ContainerAbove(txtAboveIP,addressInfo),EMPTY_JLABEL),EMPTY_JLABEL),BorderLayout.CENTER);
1652 22 May 07 gregory 182     // Cont.add(MenuOptions.make2ContainersTo1ContainerBeside(MenuOptions.make2ContainersTo1ContainerAbove(txtAboveIP2,addressInfo2),EMPTY_JLABEL),BorderLayout.SOUTH);
741 10 Oct 06 olle 183     return cont;
741 10 Oct 06 olle 184
1652 22 May 07 gregory 185     // return
1652 22 May 07 gregory 186     // MenuOptions.make2ContainersTo1ContainerAbove(MenuOptions.make2ContainersTo1ContainerBeside(theFields,ProgramWindow.EMPTY_JLABEL),ProgramWindow.EMPTY_JLABEL);
741 10 Oct 06 olle 187
1652 22 May 07 gregory 188     /*
1652 22 May 07 gregory 189      * String [] showThisTextUp=new String [3], showThisTextDown=new String
1652 22 May 07 gregory 190      * [2]; showThisTextUp[0]="Xerver Free FTP Server has been started!";
1652 22 May 07 gregory 191      * showThisTextUp[1]=""; showThisTextUp[2]="Host: ";
1652 22 May 07 gregory 192      * showThisTextDown[0]=""; showThisTextDown[1]="Server is running on
1652 22 May 07 gregory 193      * port "+FTPServerController.getPort()+"."; JTextField txtIPAdress=new
1652 22 May 07 gregory 194      * JTextField(FTPServerController.getIP(), 17);
1652 22 May 07 gregory 195      * txtIPAdress.setBackground(Color.white);
1652 22 May 07 gregory 196      * txtIPAdress.setEditable(false); txtIPAdress.setFont(defaultFont);
1652 22 May 07 gregory 197      * return make2ContainersTo1ContainerAbove(
1652 22 May 07 gregory 198      * make2ContainersTo1ContainerAbove(
1652 22 May 07 gregory 199      * giveContainerWithText(showThisTextUp),
1652 22 May 07 gregory 200      * make2ContainersTo1ContainerBeside( txtIPAdress, new JLabel(""))),
1652 22 May 07 gregory 201      * giveContainerWithText(showThisTextDown));
1652 22 May 07 gregory 202      */
741 10 Oct 06 olle 203
741 10 Oct 06 olle 204   }
741 10 Oct 06 olle 205
1652 22 May 07 gregory 206   private static Container showStopFTP() {
1652 22 May 07 gregory 207     String[] showThisTextUp = new String[1];
1652 22 May 07 gregory 208     showThisTextUp[0] = "Xerver Free FTP Server has been shut down!";
741 10 Oct 06 olle 209
1652 22 May 07 gregory 210     return showAsNorthBorderLayout(make2ContainersTo1ContainerAbove(
1652 22 May 07 gregory 211         giveContainerWithText(showThisTextUp), new JLabel("")));
741 10 Oct 06 olle 212
741 10 Oct 06 olle 213   }
741 10 Oct 06 olle 214
1652 22 May 07 gregory 215   private static Container showStartFTPSetup() {
1652 22 May 07 gregory 216     String[] showThisTextUp = new String[3], showThisTextDown = new String[2];
1652 22 May 07 gregory 217     showThisTextUp[0] = "Xerver Remote Setup has been turned on!";
1652 22 May 07 gregory 218     showThisTextUp[1] = "";
1652 22 May 07 gregory 219     showThisTextUp[2] = "A remote administrator can now change settings to Xerver at:";
741 10 Oct 06 olle 220
741 10 Oct 06 olle 221     JTextField txtIPAdress;
1652 22 May 07 gregory 222     String s_outerIP = HostInfo.getIPFromInternet(); // Returns null if
1652 22 May 07 gregory 223                               // not detected
1652 22 May 07 gregory 224     if (s_outerIP != null) {
1652 22 May 07 gregory 225       txtIPAdress = new JTextField("http://" + s_outerIP + ":32124/", 17);
1652 22 May 07 gregory 226     } else {
1652 22 May 07 gregory 227       txtIPAdress = new JTextField("IP could not be detected!", 17);
741 10 Oct 06 olle 228     }
741 10 Oct 06 olle 229
741 10 Oct 06 olle 230     txtIPAdress.setBackground(Color.white);
741 10 Oct 06 olle 231     txtIPAdress.setEditable(false);
741 10 Oct 06 olle 232     txtIPAdress.setFont(defaultFont);
1652 22 May 07 gregory 233     showThisTextDown[0] = "";
1652 22 May 07 gregory 234     showThisTextDown[1] = "Please turn off Xerver Remote Setup when you feel you are done!";
1652 22 May 07 gregory 235     return make2ContainersTo1ContainerAbove(
1652 22 May 07 gregory 236         make2ContainersTo1ContainerAbove(
1652 22 May 07 gregory 237             giveContainerWithText(showThisTextUp),
1652 22 May 07 gregory 238             make2ContainersTo1ContainerBeside(txtIPAdress,
1652 22 May 07 gregory 239                 new JLabel(""))),
1652 22 May 07 gregory 240         giveContainerWithText(showThisTextDown));
741 10 Oct 06 olle 241   }
741 10 Oct 06 olle 242
1652 22 May 07 gregory 243   private static Container showStopFTPSetup() {
741 10 Oct 06 olle 244
1652 22 May 07 gregory 245     String[] showThisTextUp = new String[6], showThisTextDown = new String[2];
1652 22 May 07 gregory 246     showThisTextUp[0] = "Xerver FTP Remote Setup has been shut down!";
1652 22 May 07 gregory 247     showThisTextUp[1] = "";
1652 22 May 07 gregory 248     showThisTextUp[2] = "Note that the local FTP Setup only shuts down when you shut down Xerver.";
1652 22 May 07 gregory 249     showThisTextUp[3] = "";
1652 22 May 07 gregory 250     showThisTextUp[4] = "You (and only you) can always change settings to Xerver FTP Setup at this address:";
1652 22 May 07 gregory 251     showThisTextUp[5] = "";
1652 22 May 07 gregory 252     JTextField txtIPAdress = new JTextField("http://"
1652 22 May 07 gregory 253         + HostInfo.getLocalIPorLocalhost() + ":32124/", 17);
741 10 Oct 06 olle 254     txtIPAdress.setBackground(Color.white);
741 10 Oct 06 olle 255     txtIPAdress.setEditable(false);
741 10 Oct 06 olle 256     txtIPAdress.setFont(defaultFont);
1652 22 May 07 gregory 257     showThisTextDown[0] = "";
1652 22 May 07 gregory 258     showThisTextDown[1] = "People from outside Internet can no longer change settings!";
1652 22 May 07 gregory 259     return make2ContainersTo1ContainerAbove(
1652 22 May 07 gregory 260         make2ContainersTo1ContainerAbove(
1652 22 May 07 gregory 261             giveContainerWithText(showThisTextUp),
1652 22 May 07 gregory 262             make2ContainersTo1ContainerBeside(txtIPAdress,
1652 22 May 07 gregory 263                 new JLabel(""))),
1652 22 May 07 gregory 264         giveContainerWithText(showThisTextDown));
741 10 Oct 06 olle 265
741 10 Oct 06 olle 266   }
741 10 Oct 06 olle 267
1652 22 May 07 gregory 268   private static Container showServerPortInUse() {
1652 22 May 07 gregory 269     String[] showThisTextUp = new String[6];
1652 22 May 07 gregory 270     showThisTextUp[0] = "Xerver FTP Server can't start since port "
1652 22 May 07 gregory 271         + FTPServerController.getPort() + " is already in use!";
1652 22 May 07 gregory 272     showThisTextUp[1] = "";
1652 22 May 07 gregory 273     showThisTextUp[2] = "Please start FTP Setup and change which port shall be used.";
1652 22 May 07 gregory 274     showThisTextUp[3] = "";
1652 22 May 07 gregory 275     showThisTextUp[4] = "It is also possible that you have another instance of";
1652 22 May 07 gregory 276     showThisTextUp[5] = "Xerver FTP Setup running using this port number.";
741 10 Oct 06 olle 277
1652 22 May 07 gregory 278     return showAsNorthBorderLayout(make2ContainersTo1ContainerAbove(
1652 22 May 07 gregory 279         giveContainerWithText(showThisTextUp), new JLabel("")));
741 10 Oct 06 olle 280   }
741 10 Oct 06 olle 281
1652 22 May 07 gregory 282   private static Container showSetupPortInUse() {
1652 22 May 07 gregory 283     String[] showThisTextUp = new String[6];
1652 22 May 07 gregory 284     showThisTextUp[0] = "Xerver FTP Setup can't start the setup at port "
1652 22 May 07 gregory 285         + FTPServerController.getSetupPort()
1652 22 May 07 gregory 286         + " since the port is already in use!";
1652 22 May 07 gregory 287     showThisTextUp[1] = "";
1652 22 May 07 gregory 288     showThisTextUp[2] = "Please close any other application using this port and try again.";
1652 22 May 07 gregory 289     showThisTextUp[3] = "";
1652 22 May 07 gregory 290     showThisTextUp[4] = "It is also possible that you have another instance of";
1652 22 May 07 gregory 291     showThisTextUp[5] = "Xerver FTP Setup running using this port number.";
741 10 Oct 06 olle 292
1652 22 May 07 gregory 293     return showAsNorthBorderLayout(make2ContainersTo1ContainerAbove(
1652 22 May 07 gregory 294         giveContainerWithText(showThisTextUp), new JLabel("")));
741 10 Oct 06 olle 295   }
741 10 Oct 06 olle 296
1652 22 May 07 gregory 297   private static Container showServerPortError() {
1652 22 May 07 gregory 298     String[] showThisTextUp = new String[3];
1652 22 May 07 gregory 299     showThisTextUp[0] = "Xerver FTP Server can't start since port "
1652 22 May 07 gregory 300         + FTPServerController.getPort() + " is an invalid port number!";
1652 22 May 07 gregory 301     showThisTextUp[1] = "";
1652 22 May 07 gregory 302     showThisTextUp[2] = "Please start FTP Setup and change which port shall be used.";
741 10 Oct 06 olle 303
1652 22 May 07 gregory 304     return showAsNorthBorderLayout(make2ContainersTo1ContainerAbove(
1652 22 May 07 gregory 305         giveContainerWithText(showThisTextUp), new JLabel("")));
741 10 Oct 06 olle 306   }
741 10 Oct 06 olle 307
1652 22 May 07 gregory 308   private static Container showSetupPortError() {
1652 22 May 07 gregory 309     String[] showThisTextUp = new String[1];
1652 22 May 07 gregory 310     showThisTextUp[0] = "Xerver FTP Setup can't start the setup at port "
1652 22 May 07 gregory 311         + FTPServerController.getSetupPort()
1652 22 May 07 gregory 312         + " since it is an invalid port number!";
741 10 Oct 06 olle 313
1652 22 May 07 gregory 314     return showAsNorthBorderLayout(make2ContainersTo1ContainerAbove(
1652 22 May 07 gregory 315         giveContainerWithText(showThisTextUp), new JLabel("")));
741 10 Oct 06 olle 316   }
741 10 Oct 06 olle 317 }