Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Closed window won't disapear
In my application, clicking on a button creates a popup window and clicking back the button makes it disapear. Simple! The problem I have is that the closed window does not disapear from the gui. I used the debugger to see what happen and all I see is that the window is in the closed stated and detached. I tried the close button of the window and the same thing happen so it is not my logic that is the problem. Something prevent the window from disapearing. When I click on menu items to change view, the window is still there.
What could be wrong?
Here is a code snippet if it helps:
if ( !notificationsWindow.isAttached() ) {
notificationsWindow.setPositionY( pEvent.getClientY() - pEvent.getRelativeY() + 40 );
UI.getCurrent().addWindow( notificationsWindow );
notificationsWindow.focus();
} else {
notificationsWindow.close();
}
I added some listeners to know what happens:
notificationsWindow.addCloseListener( event -> System.out.println( "closed" ) );
notificationsWindow.addDetachListener( event -> System.out.println( "detached" ) );
And the window gets detached and closed but it won't disapear!