remove all windows

Hi:

What would be a good way to remove all currently open subwindows in an application?..(in case there are many of them)…

thanks!!!

You can try it with

private void closeWindows()
{
	final ArrayList<Window> list = new ArrayList<>();

	// create a copy to prevent ConcurrentModificationException
	for ( final Window w : getChildWindows() )
		list.add( w );

	for ( final Window w : list )
		removeWindow( w );
}

in your main window.

greetings
Ralf

thanks Ralf, it works perfect!!!