class BorderLayoutTest extends Frame {public BorderLayoutTest(String str) {super(str); setLayout(new BorderLayout());add("North", new Button("북쪽"));add("South", new Button("남쪽"));add("West", new Button("서쪽"));add("East", new Button("동쪽"));add("Center", new Button("중앙")); setSize(200, 200);setVisible(true);}} public class BorderLayoutMain {public static void main(String[] args) {// TODO Auto-gene..
class FlowLayoutTest extends Frame {public FlowLayoutTest(String str) {super(str); FlowLayout fl = new FlowLayout();Button btn[] = new Button[10]; setLayout(fl);for (int i = 0; i < 10; i++) {btn[i] = new Button((i + 1) + "번 버튼");add(btn[i]);}setBounds(100, 100, 200, 200);setVisible(true);}} public class FlowLayoutMain { public static void main(String[] args) {// TODO Auto-generated method stubne..
class MenuTest extends Frame {public MenuTest(String str) {super(str); MenuBar mb = new MenuBar(); //메뉴바 생성Menu file = new Menu("File"); //메뉴 객체 생성MenuItem file_new = new MenuItem("new item");MenuItem file_open = new MenuItem("open");MenuItem file_delete = new MenuItem("delete");MenuItem file_save = new MenuItem("save");//세부 메뉴 생성 file.add(file_new);file.add(file_open);file.add(file_delete);file..
class TextAreaText extends Frame {public TextAreaText(String str) {super(str); Panel p = new Panel();//TextArea txt1 = new TextArea(10,30); //행열 크기 10x30TextArea txt1 = new TextArea("good",15,35); // +@ 초기 문자 셋팅TextField txt2 = new TextField("Hello Java", 20); //txt1.setText("Java World");txt1.setBackground(Color.DARK_GRAY); //영역 배경색 지정txt1.setFont(new Font("굴림체",Font.BOLD,10)); //폰트 지정txt1.setF..
class TextFieldTest extends Frame {public TextFieldTest(String str) {super(str);Panel p = new Panel();Label lb01 = new Label("ID");Label lb02 = new Label("PASSWORD");// 두 개의 레이블(텍스트) 생성 TextField txt01 = new TextField(20);TextField txt02 = new TextField(20);// 텍스트필드 생성, 글자수는 20 txt02.setEchoChar('*'); // txt02, 즉 패스워드의 글자를 *로 치환p.add(lb01);p.add(txt01);p.add(lb02);p.add(txt02);add(p);setSize(300..
class ListTest extends Frame{public ListTest(String str){super(str);Panel p = new Panel();List list = new List();//List list = new List(2);//List list = new List(5, true); //숫자만큼의 항목을 보여주고 멀티 선택이 가능list.add("수곡동");list.add("도곡동");list.add("둔산동");list.add("사직동");list.add("개신동");p.add(list);add(p);setSize(300,300);setVisible(true);}} public class ListMain { public static void main(String[] args) {..
//Label을 상속받는 깜박임레이블 클래스를 정의한다.class FlickeringLabel extends Label implements Runnable {public FlickeringLabel(String str) {super(str); // 스레드 생성 및 시작Thread thread = new Thread(this);thread.start();} @Overridepublic void run() {// TODO Auto-generated method stubint n = 0;while (true) {if (n == 0)setBackground(Color.YELLOW);elsesetBackground(Color.GREEN);if (n == 0)n = 1;elsen = 0;try {Thread.sle..
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);//Blu..
- Total
- Today
- Yesterday
- 청주
- 충북대
- 메모장
- CSS
- 게임
- 자바
- 오라클
- 안드로이드
- db
- ERP
- 소켓
- 졸업작품
- 클래스
- 이론
- 잡담
- 파이썬
- 데이터베이스
- 정렬
- 자바스크립트
- 프로젝트
- 알고리즘
- JQuery
- 배열
- SQL
- 도전과제
- 정보
- SVN
- jsp
- HTML
- 아두이노
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |