How to close a JFrame by other ways | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to close a JFrame by other ways

Hey everyone! As you all must know, when we create a window in Java using the JFrame class, the close button appears un the border of it. But ehat if i need to close this window through other ways, like a JButton or even through an ActionEvent? So that's my question, how could i close a window without clicking the border close button.

28th Jun 2017, 8:16 PM
Silas Junior
Silas Junior - avatar
1 Answer
0
@DK's Thank you a lot for the answer, it worked perfectlly.
29th Jun 2017, 12:35 AM
Silas Junior
Silas Junior - avatar