import java.awt.Component;
import java.awt.Rectangle;
import javax.swing.JFrame;
public class Main {
public static void main() {
JFrame container = new JFrame();
Component[] components = container.getComponents();
for (int i = 0; i < components.length; i++) {
Rectangle bounds = components[i].getBounds();
}
}
}