Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import java.awt.Component;

import java.awt.Window;

import javax.swing.SwingUtilities;

public class Main {
    static Window getWindowAncestor(final Component component) {
        if (component == null) {
            return null;
        } else {
            return SwingUtilities.getWindowAncestor(component);
        }
    }
}