How to close SubWindow being injected as a Spring bean?

Hi there!

So as the title says, I’m creating a SubWindow like so:

applicationContext.getBean(LoginDialog.class)

because inside it I make use of an Autoinjected class which then does use another Autoinjected JdbcTemplate. This then renders the close button useless.

Is there a way I can close the window as usual? I’d rather not change all the logic using the JdbcTemplate inside the Window.

Thank you,

Enrique

EDIT: Solved… For some reason I was overriding the close() method and doing absolutely nothing with it. So yeah. Rookie mistake!