/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package close;
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
/**
*
* @author HITHIN
*/
public class Close extends Frame{
public Close()
{
this.addWindowListener(new WindowAdapter() {
//@Override
public void windowClosing(WindowEvent e) {
System.exit(0);
// super.windowClosing(e);
}
});
}
// @Override
public void paint(Graphics g) {
g.setColor(Color.BLACK);
g.drawOval(90, 70, 80, 80);
g.drawOval(110, 95, 5, 5);
g.drawOval(145, 95, 5, 5);
g.drawLine(130,95,130,115);
g.drawArc(113, 115, 35, 20, 0, -180);
}
public static void main(String[] args){
Close c=new Close();
c.setTitle("oval shape");
c.setSize(200, 200);
c.setVisible(true);
// c.setMaximumSize();
// TODO code application logic here
}
}
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package close;
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
/**
*
* @author HITHIN
*/
public class Close extends Frame{
public Close()
{
this.addWindowListener(new WindowAdapter() {
//@Override
public void windowClosing(WindowEvent e) {
System.exit(0);
// super.windowClosing(e);
}
});
}
// @Override
public void paint(Graphics g) {
g.setColor(Color.BLACK);
g.drawOval(90, 70, 80, 80);
g.drawOval(110, 95, 5, 5);
g.drawOval(145, 95, 5, 5);
g.drawLine(130,95,130,115);
g.drawArc(113, 115, 35, 20, 0, -180);
}
public static void main(String[] args){
Close c=new Close();
c.setTitle("oval shape");
c.setSize(200, 200);
c.setVisible(true);
// c.setMaximumSize();
// TODO code application logic here
}
}
No comments:
Post a Comment