Getting All Frames in a JDesktopPane Container : JDesktopPane « Swing « Java Tutorial






import javax.swing.JDesktopPane;
import javax.swing.JInternalFrame;

public class Main {
  public static void main(String[] argv) throws Exception {
    JDesktopPane desktop = new JDesktopPane();
    JInternalFrame[] frames = desktop.getAllFrames();

    for (int i = 0; i < frames.length; i++) {
      String title = frames[i].getTitle();
      boolean isVisible = frames[i].isVisible();
      boolean isCloseable = frames[i].isClosable();
      boolean isResizeable = frames[i].isResizable();
      boolean isIconifiable = frames[i].isIconifiable();
      boolean isIcon = frames[i].isIcon();
      boolean isMaximizable = frames[i].isMaximizable();
      boolean isSelected = frames[i].isSelected();
    }
  }
}








14.54.JDesktopPane
14.54.1.JDesktopPane is a specialized JLayeredPane.
14.54.2.Adding Internal Frames to a JDesktopPaneAdding Internal Frames to a JDesktopPane
14.54.3.JDesktopPane.PALETTE_LAYERJDesktopPane.PALETTE_LAYER
14.54.4.extends JDesktopPane implements Scrollable
14.54.5.Getting All Frames in a JDesktopPane Container
14.54.6.Creating a JDesktopPane Container
14.54.7.Create a virtual desktop in your application
14.54.8.Customizing a JDesktopPane Look and Feel