List of usage examples for javax.swing JFrame getComponentCount
public int getComponentCount()
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); }/* w w w. j a v a 2s .c om*/ }
From source file:op.tools.SYSTools.java
/** * luft rekursiv durch alle Kinder eines JFrames und entfernt evtl. vorhandene Listener. *//* w ww .j av a 2 s.c o m*/ public static void unregisterListeners(JFrame container) { if (container == null) { return; } if (container.getComponentCount() > 0) { Component[] c = container.getComponents(); for (int i = 0; i < c.length; i++) { if (c[i] instanceof JComponent) { unregisterListeners((JComponent) c[i]); } } } }