List of usage examples for java.awt Component.Container add
public void add(PopupMenu popup)
From source file:com.haulmont.cuba.desktop.sys.DesktopWindowManager.java
@Override protected void showFrame(Component parent, Frame frame) { // the same as web window manager does if (parent instanceof Component.Container) { Component.Container container = (Component.Container) parent; for (Component c : container.getComponents()) { if (c instanceof Component.Disposable) { Component.Disposable disposable = (Component.Disposable) c; if (!disposable.isDisposed()) { disposable.dispose(); }/*w w w . j a v a 2s. co m*/ } container.remove(c); } container.add(frame); } else { throw new IllegalStateException( "Parent component must be com.haulmont.cuba.gui.components.Component.Container"); } }