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

Variable Index

 o CANCEL
 o frame
The frame the dialog is associated with.
 o host
Host name.
 o hostNameField
Text field for the host name.
 o OK
 o port
Port number.
 o portField
Text field for the port number.

Constructor Index

 o HostDialog(Frame, String, String, int)
Constructs a dialog window.

Method Index

 o actionPerformed(ActionEvent)
Action for ActionListener interface; invoked when the user presses button or double-clicks on a file or directory name.
 o getHostName()
Get the host name chosen by the user.
 o getPort()
Get the port chosen by the user.

Variables

 o OK
 private static final String OK
 o CANCEL
 private static final String CANCEL
 o frame
 private Frame frame
The frame the dialog is associated with.

 o hostNameField
 private TextField hostNameField
Text field for the host name.

 o portField
 private TextField portField
Text field for the port number.

 o host
 private String host
Host name.

 o port
 private int port
Port number.

Constructors

 o 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.

Methods

 o getHostName
 public String getHostName()
Get the host name chosen by the user.

Returns:
the host name chosen by the user.
 o getPort
 public int getPort()
Get the port chosen by the user.

Returns:
The port number chosen by the user.
 o 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.