Class AppInfoDialog

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class AppInfoDialog extends JDialog implements ActionListener
Dialog which prompts the user for a port number and application name.
These values are then concatenated into a String.
See Also:
  • Field Details

  • Constructor Details

    • AppInfoDialog

      public AppInfoDialog(Frame owner, String title)
      Parameters:
      owner - Frame which owns this dialog
      title - String to display in the title bar of this dialog
    • AppInfoDialog

      public AppInfoDialog(Frame owner, String title, String info)
      Constructor which populates information in the dialog box with values contained in the given String.
      Whitespace is used to parse info.
      Parameters:
      owner - Frame which owns this dialog
      title - String to display in the title bar of this dialog
      info - Information to populate the text fields with
  • Method Details

    • getInfo

      public static String getInfo(Frame owner, String title, String info)
      Displays this dialog populated with information from info and returns the user modified information.
      Parameters:
      owner - Frame which owns this dialog
      title - String to display in the title bar of this dialog
      info - Information to populate the text fields with
      Returns:
      String containing the information that the user modified. null, if the user cancels the operation.
    • getInfo

      public static String getInfo(Frame owner, String title)
      Displays this dialog and returns the information that the user has entered.
      Parameters:
      owner - Frame which owns this dialog
      title - String to display in the title bar of this dialog
      Returns:
      String containing the information that the user entered. null, if the user cancels the operation.
    • addGUIComponents

      protected void addGUIComponents()
      Lays out the components of this dialog.
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Specified by:
      actionPerformed in interface ActionListener