[차세대언어]움직이는원(자바)
- 최초 등록일
- 2003.06.24
- 최종 저작일
- 2003.06
- 7페이지/ 한컴오피스
- 가격 1,000원
소개글
프로그램 레포트~
목차
1.화면구성
2.설명서
3.코드
본문내용
import java.awt.*;
import java.awt.image.*;
import java.awt.event.*;
import java.applet.*;
public class MovePoint extends Applet implements ItemListener, ActionListener, Runnable {
Graphics gc; // 그래픽 클래스
Image img; // 이미지 클래스
Thread runner; // 쓰래드 클래스
int x, y, ji = 15, vec, sp = 10;
Color color;
TextField size, speed;
Label lsize, lspeed, lcolor, lsizeinput, lspeedinput; // 라벨들
Choice csize, cspeed, ccolor; // 선택버튼
boolean clear = false; // 원의 크기가 바뀔때 지워주기위한 변수
public void init() {
setLayout(new BorderLayout()); // 보더래이아웃 사용
Panel panel = new Panel(); // 패널로 묵기 위함
x = (int)(Math.random() * 380 ) + 35; // 원의 시작 가로 위치 (랜덤)
y = (int)(Math.random() * 260 ) + 35; // 원의 시작 세로 위치 (랜덤)
참고 자료
없음