这个文件可以在很短时间里

源代码在线查看: ells.java~41~

软件大小: 6443 K
上传用户: yq0577
关键词:
下载地址: 免注册下载 普通下载 VIP

相关代码

				package dot;								import java.awt.*;				import java.awt.event.*;				import java.applet.*;								public class ells extends Applet {				 int x,y;				 int i,j,k;				 Color mycolor;				 boolean isStandalone = false;				  /**Get a parameter value*/				  public String getParameter(String key, String def) {				    return isStandalone ? System.getProperty(key, def) :				      (getParameter(key) != null ? getParameter(key) : def);				  }				  public void update(Graphics g){				    paint(g);				  }				  public void init() {				    try {				      jbInit();				    }				    catch(Exception e) {				      e.printStackTrace();				    }				  }				  /**Construct the applet*/				  public ells() {				  }				  /**Initialize the applet*/				  /**Component initialization*/				  private void jbInit() throws Exception {				    this.setBackground(Color.white);				    this.setForeground(Color.orange);				    this.addMouseListener(new java.awt.event.MouseAdapter() {				      public void mouseEntered(MouseEvent e) {				      }				    });				    this.addMouseListener(new java.awt.event.MouseAdapter() {				      public void mousePressed(MouseEvent e) {				        this_mousePressed(e);				      }				    });				  }				  /**Get Applet information*/				  public String getAppletInfo() {				    return "Applet Information";				  }				  /**Get parameter info*/				  public String[][] getParameterInfo() {				    return null;				  }								  void this_mousePressed(MouseEvent e) {				  x=e.getX();				  y=e.getY();				  repaint();				  }				  public void paint(Graphics g){				     if(x>255)				       i=x-255;				     else				       i=x;				    if(y>255)				       j=y-255;				     else				       j=y;				     if(i+j>255)				       k=i+j-255;				      else				       k=i+j;				     mycolor=new Color(i,j,k);				     g.setColor(mycolor);				     g.fillOval(x-10,y-10,20,20);				  }												}			

相关资源