Java JFrame dispose(final JFrame frame)

Here you can find the source of dispose(final JFrame frame)

Description

Schedule disposal of a frame (async).

License

Open Source License

Declaration

public static void dispose(final JFrame frame) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.swing.*;

public class Main {
    /**/*from  ww  w  .  j a  va  2 s.c o  m*/
     * Schedule disposal of a frame (async).
     */
    public static void dispose(final JFrame frame) {
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                if (frame.isDisplayable())
                    frame.dispose();
            }
        });
    }
}

Related

  1. dispErrore(JFrame frame, String task, String mess)
  2. display(JFrame parent, JInternalFrame dialog)
  3. displayConfirmationMessage(JFrame parent, String message, String title)
  4. displayError(Exception e, JFrame jFrame)
  5. displayWindow(final JFrame window)
  6. doDisableActiveRenderingInEDT(final JFrame jFrame)
  7. drawHelpPanel(String helpToDisplay, final JFrame frame)
  8. enable(final JFrame frame)
  9. enterFullScreenIfPossible(JFrame mainAppFrame)