代码如下:import java编程 手机版。awt。*;
import java编程 手机版。applet。*;
public class JavaPhone extends Applet
String str;
int x, y, ScrX, ScrY, KeyX, KeyY;
Image img;
public void init()
x=20; y=20;
ScrX=45; ScrY=72;
KeyX=45; KeyY=350;
img = getImage(getCodeBase(), "ScreenPic编程 手机版。
jpg");
public void paint(Graphics g)
/*Background*/
g编程 手机版。setColor(new Color(60,60,60));
g编程 手机版。fillRoundRect(x, y, 250, 500, 50,50);
g编程 手机版。
setColor(new Color(0,0,0));
g编程 手机版。fillRoundRect(x+7, y+7, 235, 485, 30, 30);
/*white light*/
int[] v = {31,31,33,37,47,37,35};
int[] w = {50,38,33,31,31,35,37};
g编程 手机版。
setColor(new Color(255,255,255));
g编程 手机版。fillPolygon(v, w, v。length);
/*Nokia N73*/
Font f=new Font("Arial Black", Font编程 手机版。PLAIN, 12);
g编程 手机版。
setFont(f);
g编程 手机版。setColor(new Color(255,255,255));
g编程 手机版。drawString("NOKIA", x+25, y+28);
Font f1=new Font("Arial", Font编程 手机版。PLAIN, 12);
g编程 手机版。
setFont(f1);
g编程 手机版。drawString("N73", x+48, y+40);
/*3G Camera*/
g编程 手机版。setColor(new Color(255,255,255));
g编程 手机版。fillRoundRect(x+175, y+15, 30, 30, 10, 10);
g编程 手机版。
setColor(new Color(60,60,60));
g编程 手机版。fillRoundRect(x+177, y+17, 26, 26, 10, 10);
g编程 手机版。setColor(new Color(0,0,0));
g编程 手机版。fillOval(x+185, y+25, 10, 10);
/*ear speaker*/
g编程 手机版。
setColor(new Color(80,80,80));
g编程 手机版。drawRoundRect(115, 43, 50, 15, 15, 15);
g编程 手机版。setColor(new Color(255,255,255));
g编程 手机版。fillRoundRect(121, 47, 38, 8, 10, 10);
/*Blue Light*/
g编程 手机版。
setColor(new Color(0,0,255));
g编程 手机版。fillRoundRect(x+158, y+24, 12, 12, 3, 3);
g编程 手机版。setColor(new Color(255,255,255));
g编程 手机版。drawLine(x+160, y+29, x+160, y+26);
g编程 手机版。
drawLine(x+160, y+26, x+161, y+25);
g编程 手机版。drawLine(x+161, y+25, x+164, y+25);
/*Key*/
g编程 手机版。setColor(new Color(120,120,120));
g编程 手机版。
drawRoundRect(KeyX, KeyY, 197, 150, 25, 30);
/*Uper Key Area*/
g编程 手机版。setColor(new Color(255,255,255));
g编程 手机版。fillRoundRect(KeyX+10, KeyY+8, 177, 40, 20,20);
g编程 手机版。
setColor(new Color(220,220,220));
g编程 手机版。fillRoundRect(KeyX+20, KeyY+12, 157, 32, 10, 20);
g编程 手机版。setColor(new Color(70,70,70));
g编程 手机版。
fillRoundRect(KeyX+60, KeyY+15, 80,26, 5, 5);
g编程 手机版。setColor(new Color(180,180,180));
g编程 手机版。fillRoundRect(KeyX+62, KeyY+17, 76,22, 10, 10);
g编程 手机版。
setColor(new Color(250,250,250));
g编程 手机版。fillRoundRect(KeyX+91, KeyY+18, 20, 20, 5, 5);
g编程 手机版。setColor(new Color(100,100,100));
g编程 手机版。
fillRoundRect(KeyX+93, KeyY+20, 16, 16, 4, 4);
g编程 手机版。setColor(new Color(0,0,0));
g编程 手机版。fillRect(KeyX+10, KeyY+28, 81, 2);
g编程 手机版。fillRect(KeyX+111, KeyY+28, 76, 2);。