how to get all of the chldren of a panel in java

Java
Component[] components = jpanel.getComponents();
Source

Also in Java: