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.
How to disable "x" on upper right corner of Windows
I am using vaadin 6.8. I'd like to disable the "x" on Windows so user can't close the window using that.
How do I do that? Thanks for any help.
I searched this forum and a 7 year old thread gave the following method:
.i-window-closebox {
display: none;
}
I put this in the styles.css file of my theme, but it didn't work.
My entire css file is like this:
@import url(../reindeer/styles.css);
.ess-label-big {
font-size: 14px;
line-height: normal;
}
.i-window-closebox {
display: none;
}
The label text font size change works so this css file is loaded. But the "x" on upper right corner of windows did not disappear.
Hi tony,
im not sure if this works but i think you don't need css.
It definitely works in newer Vaadin versions.
https://vaadin.com/api/6.8.8/com/vaadin/ui/Window.html#setClosable(boolean)
Window window = new Window();
window.setClosable(false);
regards
Johannes