Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 국제화
- 어노테이션
- 에러페이지
- 메서드
- 클래스
- 안드로이드
- Java
- JavaScript
- OGNL
- 배열
- layout
- Menu
- 예외처리
- paint
- 오버로딩
- HTML
- Graphic
- Android
- Spring
- mybatis
- AWT
- 전화걸기
- JSP
- oracle
- 생성자
- 기본
- Eclips
- 이클립스
- struts2
- 메소드
Archives
- Today
- Total
note
Graphic Font 본문
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);
}
}
'자바 > AWT' 카테고리의 다른 글
Graphic 도형 그리기 (0) | 2011.12.29 |
---|---|
Graphic Color (0) | 2011.12.29 |
Adapter Ex (0) | 2011.12.29 |
Window Event (0) | 2011.12.29 |
Mouse Motion (0) | 2011.12.29 |