BelethDev Posted September 29, 2023 Share Posted September 29, 2023 Sorry for a noob question, I'm a C dev so all this OOP is melting my brain. I'm working on a GUI for my script, but everytime I press the start button and the gui destroys itself, the script kills itself instead of running. Any ideas on how to solve it? Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted September 29, 2023 Share Posted September 29, 2023 (edited) 57 minutes ago, BelethDev said: Sorry for a noob question, I'm a C dev so all this OOP is melting my brain. I'm working on a GUI for my script, but everytime I press the start button and the gui destroys itself, the script kills itself instead of running. Any ideas on how to solve it? I believe this is what you are looking for in your GUI class^^ setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); Edited September 29, 2023 by Khaleesi 1 Quote Link to comment Share on other sites More sharing options...
BelethDev Posted September 29, 2023 Author Share Posted September 29, 2023 1 hour ago, Khaleesi said: I believe this is what you are looking for in your GUI class^^ setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); Thanks! I'm still kind of in the middle of learning Java, been putting it off for years now. Guess I finally have a reason to learn it lol 1 Quote Link to comment Share on other sites More sharing options...