Java JDialog closeDialog(final JDialog dialog)

Here you can find the source of closeDialog(final JDialog dialog)

Description

Send a WindowEvent#WINDOW_CLOSING event to the given dialog.

License

Open Source License

Declaration


static void closeDialog(final JDialog dialog) 

Method Source Code

//package com.java2s;
import javax.swing.JDialog;

import java.awt.event.WindowEvent;

public class Main {
    /**//  www .jav  a 2s.c  o m
     * Send a {@link WindowEvent#WINDOW_CLOSING} event to the given dialog.
     */

    static void closeDialog(final JDialog dialog) {
        final WindowEvent ev = new WindowEvent(dialog,
                WindowEvent.WINDOW_CLOSING);
        dialog.dispatchEvent(ev);
    }
}

Related

  1. alignDialogInMiddleOfScreen(JDialog dlg)
  2. applyDefaultProperties(final JDialog comp)
  3. calculatePosition(Window parent, JDialog dialog)
  4. cascadeDialog(JDialog dialog, JDialog parent)
  5. chooseFile(final JDialog dialog, final String title)
  6. commonFileDialog(JDialog parent, boolean save)
  7. configureCancelForDialog(final JDialog dialog, JButton cancelButton)
  8. decorate(JDialog dialog, int type)
  9. displayInDialog(JComponent comp, JDialog result)