import java.awt.*;
import java.awt.event.*;
public class test extends frame implements actionlistener{
private button newB;
public test(String title,intx,inty,int width,int height){
setBounds(x,y,width,height)
setTitle(title);
addWindwoListener(new WindowAdapter(){
public void windwoClosing(WindowEvent e){
dispose()
System.exit(0)
}};
setLayout(newFlowLayout());
newB=new Button("NEW");
newB.addActionListener(this):
add(newB);
show()
}
public void actionperformed(ActionEvent e){
__________________      想了半天不知道这句应该填什么
repaint()
}
public void paint(Graphics g){
g.drawRect(100,100,10,10)
}}不知道如何调用paint方法,参数怎么写?