본문 바로가기

Chapter 10. AWT & Applet Chapter 10. AWT & Applet 1. AWT(Abstract Window Toolkit) - GUI Programming을 하기 위한 도구 - GUI Application의 개발에 필요한 여러 개의 관련 Package와 Class의 집합으로 구성 - 특징 · AWT로 작성된 GUI Application은 Platform에 독립적이기 때문에 여러 종류 OS에서 Code를 수정하지 않고 실행이 가능 · Windows Button과 같은 GUI Component를 직접 구현하지 않고 해당 OS의 Native Component를 사용하기 때문에 AWT로 작성된 GUI Application의 외형은 실행되는 OS마다 달라질 수 있다. · 여러 종류의 GUI 기반의 OS들이 공통적으로 가지고 있는 Co.. 더보기
AWT Method II Font Method Explain Font(String name, int style, int size) name : 사용할 Font의 이름 style : Font의 Style 지정 size : Font의 크기 Color Method Explain Color(int r, int g, int b) 0~255의 정수 값을 이용해 색 조절(r : red / g : green / b : blue) Color(float r, float g, float b) 0.0~1.0의 정수 값을 이용해 색 조절(r : red / g : green / b : blue) Color(int r, int g, int b, int a) a : Alpha 값이 추가되어 있으며 0~255사이의 정수 값을 갖음 Color(float r, .. 더보기
AWT Method I Container Method Explain Color getBackground() Component의 배경색을 얻음 void setBackground(Color c) Component의 배경색을 지정된 색으로 변경 Cursor getCursor() Component에 지정된 Cursor를 얻음 void setCursor(Cursor c) Component의 Cursor를 지정 Font getFont() Component에 지정되어 있는 Font를 얻음 void setFont(Font f) Component의 Font를 지정 Color getForeground() Component의 전경색을 얻음 void setForeground(Color c) Component의 전경색을 지정 int getHeigth.. 더보기