You can't do what you want in the constructor. Your handleLogin() method calls this.getWindow(), but your the button doesn't have a window until after it (and its parents) have been added to some frame that has been made visible. You have to call handleLogin() after the GUI has been fully created and made visible.
0
aSoler
On
Try to create a new thread that waits and then call the function. I suppose it fails because of the element is not created, meaby with this it is... hope I help.
You can't do what you want in the constructor. Your
handleLogin()
method callsthis.getWindow()
, but your the button doesn't have a window until after it (and its parents) have been added to some frame that has been made visible. You have to callhandleLogin()
after the GUI has been fully created and made visible.