This Java tip illustrates a method of collecting all the frames created by the developer in the application. Further, it may also determine the titles and the visibility of the frames.

  // Collect all active frames in a array
    Frame[] activeframes = Frame.getFrames();
    for (int i=0; i<activeframes.length; i++) {
        // Get frame's title
        String title = activeframes[i].getTitle();
        // Determine if the frame is visible
        boolean isVisible = activeframes[i].isVisible();