Duplicated components painted in Child Window

Good day…

im using child windows for registering/editing some data.

the app consists of an vertical layout with some buttons and a form
the first time the window is rendered, the behaviour of the window and its child components (the mentioned form especially) works good.
then i close the child window using removeWindow(popupWindow) method.

then, i click a button for opening same window, a button is displayed twice.

variables used in both pop up and the main window were defined as class attributes.

what could be the problem here? how can this be solved??

best regards,


Most probably the code that runs when you click the button to open the window adds some components to the window. Make sure that this only happens once, or clear the layout in the window before re-adding everything.