Example usage for java.awt Dialog getOwner

List of usage examples for java.awt Dialog getOwner

Introduction

In this page you can find the example usage for java.awt Dialog getOwner.

Prototype

public Window getOwner() 

Source Link

Document

Returns the owner of this window.

Usage

From source file:Main.java

public static void centerInOwner(Dialog dialog) {
    Container parent = dialog.getOwner();
    if (parent != null && parent.isShowing())
        centerInParent(dialog, dialog.getParent());
    else/*from  w  ww  .  j  a v  a 2 s . c o  m*/
        center(dialog);
}