Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import javax.swing.JComponent;
import javax.swing.JInternalFrame;

public class Main {
    public static JInternalFrame getInternalFrameForComponent(JComponent c) {
        java.awt.Container p = c;
        do {
            if (p instanceof JInternalFrame) {
                return (JInternalFrame) p;
            }
            p = p.getParent();
        } while (p != null);
        return null;
    }
}