package com.graphic;//Graphics Font
import java.awt.*;
import java.awt.event.*;
import java.awt.Frame;
import java.awt.Font;
class GraphicFrame extends Frame{
//Paint 메서드 오버라이딩
//paint 메소드를 재정의하면 프로그램 구동시 자동으로 호출됨
public void paint(Graphics g){
g.drawString("글꼴체가 변경되나유?", 10,60);
Font f = new Font("궁서체",Font.BOLD,20);
g.setFont(f);
g.drawString("ㅎㅎㅎㅎㅎㅎㅎㅎ",10,100);
} //문자열 x,y
public GraphicFrame(){
addWindowListener (new WindowAdapter(){
public void windowClosing(WindowEvent e){
dispose();
System.exit(0);
}});
}
}
public class GraphicTest01 {
public static void main(String[] args) {
GraphicFrame f = new GraphicFrame();
f.setSize(270,150);
f.setVisible(true);
}
}