Getting All Frames in a JDesktopPane Container : MDI « Swing JFC « Java






Getting All Frames in a JDesktopPane Container

 
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();
    }
  }
}

   
  








Related examples in the same category

1.Dynamic menu item for MDI children window and scroll barDynamic menu item for MDI children window and scroll bar
2.Creating a JDesktopPane Container
3.Create a virtual desktop in your application
4.Build multiple document interface by yourselfBuild multiple document interface by yourself