#New To Javax.Swing -- Exit Button Not Working

4 messages · Page 1 of 1 (latest)

cinder stone
#

Hi. I'm learning swing and trying to create a desktop application. The first step to this application is a login screen. So far everything has worked until I implemented the logic for getting the exit buttons name and checking if that button is clicked and if so then exit the system. I'm not sure what I'm doing wrong, but when I click the button, I get an error I don't understand. Thanks in advance

screen code: https://pastebin.com/K0scy310
error message: https://pastebin.com/CQMKJgpm

tall houndBOT
#

This post has been reserved for your question.

Hey @cinder stone! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

cinder stone
#

I was able to fix it by creating a separate class for the close button.