exit Button « Button « Java Swing Q&A





1. java swing close window without exiting app    stackoverflow.com

I have a little frame where I ask user & password. This frame will be opened clicking over a button in a main window. Then I have two buttons: ok and cancel. When ...

2. How do I add functionality to the exit button without System.exit(0)?    stackoverflow.com

I went through and had the program System.exit(0) whenever the user clicked the window's red exit button. Is there a more efficient way to add functionality to that button?

import javax.swing.JOptionPane;
import java.util.Scanner;

class ...

3. exit button in GUI    forums.oracle.com