Class AboutDialog

All Implemented Interfaces:
ImageObserver, KeyEventDispatcher, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public final class AboutDialog extends JDialog implements KeyEventDispatcher
Provides a reusable and consistent AboutDialog that can be used in any application. By specifying an AboutInfo instance customized for your application, a standard AboutDialog can be shown without having to write any code for it in your application. See also AboutPanel if you'd rather embed a JPanel somewhere instead of popping up a dialog.
Since:
2018-02-14
Author:
scorbo2
See Also:
  • Constructor Details

    • AboutDialog

      public AboutDialog(Frame parent, AboutInfo info)
      Creates a new AboutDialog instance with the given parent window and application info,
      Parameters:
      parent - The JComponent that owns this dialog.
      info - An AboutInfo instance containing the description of this application.
  • Method Details

    • refreshMemoryStats

      public void refreshMemoryStats()
      Updates the memory stats label on the wrapped AboutPanel. This method simply defers to AboutPanel.refreshMemoryStats()
    • setVisible

      public void setVisible(boolean visible)
      Overrides:
      setVisible in class Dialog
    • dispose

      public void dispose()
      Overridden to handle memory cleanup. This was originally done in setVisible(false) but it turns out that never gets invoked when the dialog is disposed.
      Overrides:
      dispose in class Window
    • dispatchKeyEvent

      public boolean dispatchKeyEvent(KeyEvent e)
      Press ESC or Enter to close and dispose the dialog.
      Specified by:
      dispatchKeyEvent in interface KeyEventDispatcher
      Parameters:
      e - the KeyEvent to dispatch
      Returns:
      Whether we handled the key event or not.