How to create frame in java awt - LearnHowToCode SarkariResult.com Interview Questions and Answers LearnHowToCodeOnline
How to create frame in java awt

How to create frame in java awt

import java.awt.*;
import java.awt.event.*;
class MyFrame extends Frame
{
public static void main(String[]arr)
{
MyFrame f=new  MyFrame();
f.setTitle("My Awtfirst  Frame by shashi");
f.setSize(300,250);
f.setVisible(true);
f.addWindowListener(new MyClass());
}
}
class MyClass implements WindowListener
{
public void windowActivated(WindowEvent e){}
public void windowClosed(WindowEvent e){}
public void windowClosing(WindowEvent e){
System.exit(0);
}
public void windowDeactivated(WindowEvent e){}
public void windowDeiconified(WindowEvent e){}
public void windowIconified(WindowEvent e){}
public void windowOpened(WindowEvent e){}

}

About EasyToCode

I'm Ethan Mariano a software engineer by profession and reader/writter by passion.I have good understanding and knowledge of AngularJS, Database, javascript, web development, digital marketing and exploring other technologies related to Software development.

0 comments:

Featured post

Political Full Forms List

Acronym Full Form MLA Member of Legislative Assembly RSS Really Simple Syndication, Rashtriya Swayamsevak Sangh UNESCO United Nations E...

Powered by Blogger.