鼠标在按钮上移动会删除上面的线条,为什么,怎么改,请高手指导一下,谢谢!import javax.swing.*; 
import java.awt.*; 
import java.util.*; 
import java.text.*; 
import java.awt.event.*;
public class test extends JFrame implements Runnable{
    int main_x=15;
    int main_y=12;
    int toppanel_height=40;
    int height=main_y*20+toppanel_height+68;
    int width=main_x*20+15;    
    public static void main(String[] args){
        EventQueue.invokeLater(new Runnable(){
            public void run(){
                try{
                    test frame=new test();
                    frame.setVisible(true);
                    new Thread(frame).start();
                }catch(Exception e){
                    e.printStackTrace();
                }
            }
        });
    }
    public test(){
        super();
        setBounds(0,0,width,height);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        getContentPane().setLayout(new BorderLayout());
        DrawPanel mainpanel=new DrawPanel();
        getContentPane().add(mainpanel,BorderLayout.CENTER);    }
    class DrawPanel extends JPanel implements MouseListener,ActionListener{//  
    final JButton aaa[][]=new JButton[100][100];
        public DrawPanel(){
            super();
            setLayout(null);
            setBorder(BorderFactory.createLoweredBevelBorder());
            for(int xx=0;xx<main_x;xx++){
                for(int yy=0;yy<main_y;yy++){
                    aaa[xx][yy]=new JButton();
                    aaa[xx][yy].setBounds(xx*20+5,yy*20+5,20,20);
                    add(aaa[xx][yy]);
aaa[xx][yy].setBackground(Color.BLACK);
aaa[xx][yy].setBorder(BorderFactory.createRaisedBevelBorder());
                    aaa[xx][yy].addActionListener(this);
                    aaa[xx][yy].addMouseListener(this);
                }
            }
        }
        public void paint(Graphics g){
            super.paint(g);
            Graphics2D g2=(Graphics2D)g;
            g2.setColor(Color.GRAY);
            g2.setStroke(new BasicStroke(2));
            for(int xx=0;xx<main_x;xx++){
                for(int yy=0;yy<main_y;yy++){
                    g2.drawLine(xx*20+5,5,xx*20+5,width-10);
                    g2.drawLine(5,yy*20+5,height-10,yy*20+5);
                }
            }
        } 
        public void actionPerformed(ActionEvent e){
            remove((JButton)e.getSource());
            this.repaint();
        }
        public void mouseClicked(MouseEvent e){ 
        } 
    
        public void mouseEntered(MouseEvent e){ 
        } 
    
        public void mouseExited(MouseEvent e){ 
        } 
    
        public void mousePressed(MouseEvent e){ 
        } 
    
        public void mouseReleased(MouseEvent e){
        }
    }
    public void run(){
    }
}