Top "Windowlistener" questions

Java AWT and Swing listener interface for receiving window events.

How to capture a JFrame's close button click event?

I want to call a method confirmExit() when the red close button of the title bar of a JFrame is …

java swing jframe windowlistener
how to set new text in JTextField after creation?

I have a jTextField , and I set it's value to a certain sum when I create the frame. Here is …

java swing jtextfield settext windowlistener
Java - how do I prevent WindowClosing from actually closing the window

I seem to have the reverse problem to most people. I have the following pretty standard code to see if …

java swing jframe windowlistener
JFrame On Close Operation

I was wondering if there is a way, by clicking on the "X", to let the program perform some code …

java swing user-interface jframe windowlistener
Create custom operation for setDefaultCloseOperation?

I want to make my Java Application to call my own custom made function when the "close" cross button is …

java swing user-interface windowlistener
Java Swing adding Action Listener for EXIT_ON_CLOSE

I have a simple GUI: public class MyGUI extends JFrame{ public MyGUI(){ run(); } void run(){ setSize(100, 100); setVisible(true); setDefaultCloseOperation(JFrame.…

java swing jframe windowlistener
AWT Window Close Listener/Event

I am sorry if this is a n00b question, but I have spent way too long for this once …

java swing events awt windowlistener
Java listener on dialog close

I have a Java app that displays a list from a database. Inside the class is the following code to …

java swing jdialog windowlistener
setDefaultCloseOperation to show a JFrame instead

I am making a word processor application in order to practise Java and I would like it so that when …

java swing jframe windowlistener
How do I close a java application from the code

How do you close a java application from the code?

java swing windowlistener