티스토리 뷰
import java.awt.Color;
import java.awt.Frame;
import java.awt.Label;
import java.awt.Panel;
class LabelTest extends Frame{
Panel p;
Label label1, label2, label3;
public LabelTest(){
setTitle("Label Test");
p = new Panel();
label1 = new Label("개신동");
label2 = new Label("모충동");
label3 = new Label("수곡동");
label1.setBackground(Color.yellow);
label2.setBackground(Color.BLUE);
label3.setBackground(Color.blue);
//Blue와 blue의 차이??
//The color blue. In the default sRGB space.
//Blue은 1.4 이후에 정의된 상수인듯??
p.add(label1);
p.add(label2);
p.add(label3);
add(p);
setSize(300,100);
setVisible(true);
}
}
public class LabelMain {
public static void main(String[] args) {
// TODO Auto-generated method stub
LabelTest lt = new LabelTest();
}
}
'java,web study > 3주차 (7월 15일 ~21일)' 카테고리의 다른 글
리스트 컴포넌트 (0) | 2013.07.17 |
---|---|
깜박이는 레이블 (0) | 2013.07.17 |
제네릭 (0) | 2013.07.16 |
빠른 열거 (0) | 2013.07.16 |
String Format (0) | 2013.07.16 |
- Total
- Today
- Yesterday
- SQL
- HTML
- 청주
- 졸업작품
- 자바스크립트
- JQuery
- 아두이노
- 데이터베이스
- 자바
- CSS
- 메모장
- 잡담
- 프로젝트
- 정보
- 안드로이드
- 게임
- ERP
- 배열
- 이론
- SVN
- 충북대
- 파이썬
- 클래스
- 알고리즘
- 도전과제
- 정렬
- jsp
- 소켓
- db
- 오라클
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |