import org.eclipse.swt.widgets.Composite; ... Composite composite = new Composite(parent, SWT.NONE); Composite parentComposite = composite.getParent();In this example, we create a new composite widget and store a reference to its parent composite using the getParent method. Package Library: This method is part of the Eclipse Standard Widget Toolkit (SWT), a graphical user interface widget toolkit for Java. It is found in the org.eclipse.swt.widgets package.