Skip to main content

Java Program: AWT Frame Closing Event

Program

import java.awt.*;
import java.awt.event.*;
public class awtexample extends Frame{
    public static void main(String[] args)
    {
        Frame f= new Frame("New Frame");
        f.setSize(400, 500);
        f.setVisible(true);
        f.addWindowListener(new WindowAdapter(){
        public void windowClosing(WindowEvent e)
        {
        System.exit(0);
        }
     });
    }
}

Output




Comments

  1. I would like to thank you for your nicely written post, its informative and your writing style encouraged me to read it till end. Thanks
    online Python certification course | python training in OMR | Python training course in Chennai

    ReplyDelete
  2. Well done! Pleasant post! This truly helps me to discover the solutions for my inquiry. Trusting, that you will keep posting articles having heaps of valuable data. You're the best! 
    Java training in Chennai | Java training in Bangalore

    Java online training | Java training in Pune

    ReplyDelete
  3. Excellant post!!!. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it.
    Data Science Training in Indira nagar
    Data Science training in marathahalli
    Data Science Interview questions and answers



    ReplyDelete
  4. Thanks for sharing such an awesome Information with us

    I Got Job in my dream company with decent 12 Lacks Per Annum salary, I have learned this world most demanding course out there in the current IT Market from the Big Data Training In Bangalore Providers who helped me a lot to achieve my dreams comes true. Really worth trying.

    ReplyDelete
  5. I Got Job in my dream company with decent 12 Lacks Per Annum Salary, I have learned this world most demanding course out there in the current IT Market from the Data Science Course in Bangalore Providers who helped me a lot to achieve my dreams comes true. Really worth trying.

    ReplyDelete

Post a Comment

Share this to your friends