Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.awt.Component;

public class Main {
    public static Component getRootPane(Component p_component) {
        Component rootPane = p_component.getParent();
        for (; rootPane != null;) {
            if (rootPane.getParent() == null) {
                break;
            }
            rootPane = rootPane.getParent();
        }
        return rootPane;
    }
}