Composite composite = new Composite(parent, SWT.NONE); Control[] children = composite.getChildren(); for (Control child : children) { // Do something with each child control }
Composite composite = new Composite(parent, SWT.NONE); Control[] children = composite.getChildren(); for (Control child : children) { child.dispose(); // Remove each child control }In both examples, the package library used is org.eclipse.swt.widgets.