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.
Subwindow not shown until I change tabs or show it twice
I have 2 tabs. a button in one of the tabs opens a subwindow.
the problem is that the subwindow is only shown if I click the button twice or if I click the button once and then switch to another tab.
is there some known typical mistake developers make in this area?
ListSelectionDialog newWindow = new ListSelectionDialog(title, items, valueListener);
windowProvider.getWindow().addWindow(newWindow);
(Vaadin 6.7.3)
Hard to know what is happening with just this.
How are you creating that window ?
It looks like you are doing it from another thread, if yes check this sticky.
If not, please copy on the forum the click handler code to see what is happening.
Alexey Java: the problem is that the subwindow is only shown if I click the button twice or if I click the button once and then switch to another tab.
is there some known typical mistake developers make in this area?
Another possibility is that the component triggering the event is not in immediate mode. However, a Button should always be immediate by default so I suspect this is an issue with background threads as Mathias suggested.
Thank you, guys! I removed the background thread and it works fine now.