Class HostDialog
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Window
|
+----java.awt.Dialog
|
+----HostDialog
- public class HostDialog
- extends Dialog
- implements ActionListener
Class definition for a dialog that allows a user to choose a
host name and port for a socket connection.
- Version:
- $Revision: 1.9 $, $Date: 2000/10/30 17:03:48 $
- Author:
- John Cavanaugh
-
CANCEL
-
-
frame
- The frame the dialog is associated with.
-
host
- Host name.
-
hostNameField
- Text field for the host name.
-
OK
-
-
port
- Port number.
-
portField
- Text field for the port number.
-
HostDialog(Frame, String, String, int)
- Constructs a dialog window.
-
actionPerformed(ActionEvent)
- Action for ActionListener interface; invoked when the user
presses button or double-clicks on a file or directory name.
-
getHostName()
- Get the host name chosen by the user.
-
getPort()
- Get the port chosen by the user.
OK
private static final String OK
CANCEL
private static final String CANCEL
frame
private Frame frame
- The frame the dialog is associated with.
hostNameField
private TextField hostNameField
- Text field for the host name.
portField
private TextField portField
- Text field for the port number.
host
private String host
- Host name.
port
private int port
- Port number.
HostDialog
public HostDialog(Frame frame,
String title,
String host,
int port)
- Constructs a dialog window.
- Parameters:
- frame - The frame the dialog is associated with.
- title - A title for the dialog window.
getHostName
public String getHostName()
- Get the host name chosen by the user.
- Returns:
- the host name chosen by the user.
getPort
public int getPort()
- Get the port chosen by the user.
- Returns:
- The port number chosen by the user.
actionPerformed
public void actionPerformed(ActionEvent e)
- Action for ActionListener interface; invoked when the user
presses button or double-clicks on a file or directory name.
- Parameters:
- e - The event which triggered the action.