question: public static void close ( final JGraphTab graphTab ) { final List < CGraphPanel > graphs = new ArrayList < CGraphPanel > ( ) ; for ( int i = 0 ; i < graphTab . getTabCount ( ) ; i ++ ) { graphs . add ( ( ( CGraphPanel ) graphTab . getComponentAt ( i ) ) ) ; } close ( SwingUtilities . getWindowAncestor ( graphTab ) , graphs ) ; }
target:  Closes a graph window. Before closing the graph window, the user is asked whether he wants to save modified graphs.