Count the listeners

Report a typo

How many window listeners are implemented in the code snippet below?

public class CheckExitExample extends JFrame {
    private class CheckOnExit extends WindowAdapter {
        private final ConfirmWindow checker = new ConfirmWindow();

        public void windowClosing(WindowEvent e) {
            checker.setVisible(true);
        }

        public void windowClosed(WindowEvent e) {
            checker.setVisible(false);
        }
    }
}
Enter a number
___

Create a free account to access the full topic