Google+ Followers

Connect

Get Updates Via Email

Enter your email address:

Delivered by FeedBurner

Monday, 11 November 2013

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




1 comment :

  1. I have read your blog its very attractive and impressive. I like it your blog.

    Java Online Training Java EE Online Training Java EE Online Training Java 8 online training Core Java 8 online training

    Java Online Training from India Java Online Training from India Core Java Training Online Core Java Training Online Java Training InstitutesJava Training Institutes

    ReplyDelete

Share this to your friends