I am creating a form in Swing toolkit.
When I want to close it, I go to the JFrame and set it to visible false.
Since the frame creates a Java class of the form, I can easily do it from outside.
When I have a cancel button I usually send a listener inside the form that calls the outer:
Jframe.setVisible (false)
Is there a better way ?
try these if you do not need to code much! click here to view image