Close workArea tabs

I ge it by using WindowManager like this:

 Collection<Screen> screens = windowManager.getOpenedScreens().getWorkAreaScreens();
                        for (Screen s : screens){

But windowManager is deprecated and I wonder if there is a better way of do it. In any case I need to close al tabs in a certain moment.

Use Screers bean for replacement of windowManager.

    private Screens screens;

                    .stream().forEach(scren -> scren.close(StandardOutcome.CLOSE));

1 Like

Thank you a lot, this is working perfectly.