编写Applet代码,要实现在拖动鼠标的过程中绘制一系列线条.(注意是一系列线条)
以下是我写的代码,我的代码还没有写完,请大家帮我补充和修改一下,谢谢  (我会及时结贴给分)
import java.awt.*;
import java.awt.event.*;
import java.applet.*;public class DrawLine extends Applet implements MouseMotionListener
{
int width,height;
Image backbuffer;
Graphics backg;
int mx,my;
double t=0;public void init()
{
width=getSize().width;
height=getSize().height;mx=width/2;
my=height/2;backbuffer=createImage(width,height);
backg=backbuffer.getGraphics();
backg.setColor(Color.black);
backg.fillRect(0,0,width,height);
backg.setColor(Color.white);addMouseMotionListener(this);
}
}