JAVA GUI??????? - PowerPoint PPT Presentation

About This Presentation
Title:

JAVA GUI???????

Description:

Title: JAVA GUI Author: Last modified by: Created Date: 4/29/2003 3:31:24 AM Document presentation format – PowerPoint PPT presentation

Number of Views:37
Avg rating:3.0/5.0
Slides: 24
Provided by: 633667
Category:
Tags: gui | java

less

Transcript and Presenter's Notes

Title: JAVA GUI???????


1
JAVA GUI???????
  • ?2?

?????????????? ???????
2
?????
???????????????
public void paint(Graphics g)
g.drawLine(100,100,200,200)
g.drawLine(200,100,300,200)
??2??????
3
???????????
public void paint(Graphics g)
g.setColor(Color.red) g.drawLine(100,100,200,2
00) g.setColor(Color.blue)
g.drawLine(200,100,300,200)
4
????
setColor(?)??????????
??? Color.red Color.blue Color.yellow Color.white
??????????????
5
???????
?????????3??(RGB) ? ? ? ???????????????????
6
??
setColor(new Color(?,?,?)) ??????? 0255??????????
?? ???????????
7
?
setColor(new Color(0,0,0))
??
setColor(new Color(255,255,255))
??
setColor(new Color(0,255,255))
???
setColor(new Color(125,125,125))
???
8
??????????
public void paint(Graphics g)
g.setColor(new Color(200,0,150))
g.fillRect(100,100,200,50)
9
??????
???????????????? ????????????(??????????)
??java?for??????????
10
for?
for(??????????1??????)
? for(i1ilt5i)
i??i?1??????????? ???4????????
11
for???????
public void paint(Graphics g) int i
for(i100ilt300i10)
g.drawLine(100,i,i,300)
i10?? i?10?????????? ??????????? ??????????
12
for???????
public void paint(Graphics g) int i
for(i0ilt255i) g.setColor(new
Color(0,i,255-i)) g.drawLine(i,0,i,100)

???????? ?????!
13
??????????
??????????????
14
?????????
????????????-1,1-1,1????? ???????500500?????
???????(x,y)?? ??????(x,y)????
x250250x y250-250y ??????
15
????????
????yx ?????????
2
???????????????????????? JAVA??????????????? ??(20
0,200)?????????? drawLine?????????????
drawLine(200,200,200,200)
16
?????????
public void paint(Graphics g) double x,y
int x1,y1 for(x-1xlt1x0.01)
yxx x1(int)(250250x)
y1(int)(250-250y) g.drawLine(x1,y1,x1,y1)

17
public void paint(Graphics g) double x,y
int x1,y1 for(x-1xlt1x0.01)
yxx x1(int)(250250x)
y1(int)(250-250y) g.drawLine(x1,y1,x1,y1)

?????????? x,y?double??????
18
public void paint(Graphics g) double x,y
int x1,y1 for(x-1xlt1x0.01)
yxx x1(int)(250250x)
y1(int)(250-250y) g.drawLine(x1,y1,x1,y1)

????x1,y1??????? ??????????????? ???
19
public void paint(Graphics g) double x,y
int x1,y1 for(x-1xlt1x0.01)
yxx x1(int)(250250x)
y1(int)(250-250y) g.drawLine(x1,y1,x1,y1)

x??1??1???0.01?? ?????????????
20
public void paint(Graphics g) double x,y
int x1,y1 for(x-1xlt1x0.01)
yxx x1(int)(250250x)
y1(int)(250-250y) g.drawLine(x1,y1,x1,y1)

?????????
21
public void paint(Graphics g) double x,y
int x1,y1 for(x-1xlt1x0.01)
yxx x1(int)(250250x)
y1(int)(250-250y) g.drawLine(x1,y1,x1,y1)

???????? ???????????????
???????????? ??????????
22
public void paint(Graphics g) double x,y
int x1,y1 for(x-1xlt1x0.01)
yxx x1(int)(250250x)
y1(int)(250-250y) g.drawLine(x1,y1,x1,y1)

(x1,y1)???????
23
?????????
?????? ??????? ??????????????????
Write a Comment
User Comments (0)
About PowerShow.com