Example usage for javax.swing JFrame getComponent

List of usage examples for javax.swing JFrame getComponent

Introduction

In this page you can find the example usage for javax.swing JFrame getComponent.

Prototype

public Component getComponent(int n) 

Source Link

Document

Gets the nth component in this container.

Usage

From source file:Main.java

public static void main(String[] argv) throws Exception {

    JFrame container = new JFrame();
    // Get number of children
    int count = container.getComponentCount();

    for (int i = 0; i < count; i++) {
        Component c = container.getComponent(i);
    }/*from www.java 2s .  c  om*/
}