有关找不到符号的问题,望大神帮忙看看
import java.awt.*;import java.awt.event.*;
class MyButton extends Button{
Container con;
MyButton(){
this.con=con;
setVisible(true);
setSize(20,15);
}
}
class MyPanel extends Panel implements MouseListener{
GridLayout grid;
int i,j;
MyPanel(){
grid=new GridLayout(6,9);
setLayout(grid);
MyButton mybutton[][]=new MyButton[6][9];
for(i=0;i<6;i++)
for(j=0;j<9;j++){
mybutton[i][j]=new MyButton();
add(mybutton[i][j]);
mybutton[i][j].addMouseListener(this);
}
setSize(225,90);
setVisible(true);
}
public void mousePressed(MouseEvent e){
/*if(e.getSource()==mybutton[1][1])*/
{setBackground(Color.pink);
}
}
public void mouseReleased(MouseEvent e){}
public void mouseExited(MouseEvent e){}
public void mouseEntered(MouseEvent e){}
public void mouseClicked(MouseEvent e){
if(e.getClickCount()>=2)
{System.exit(1);
}
}
}
class MyFrame extends Frame{
MyPanel mypanel;
Label label;
MyFrame(String s){
super(s);
mypanel=new MyPanel();
label=new Label("Have a try,maybe you just have one chance,however,that's game!",Label.CENTER);
label.setSize(450,120);
label.setBackground(Color.pink);
Font font=new Font("default",Font.PLAIN+Font.ITALIC,15);
label.setFont(font);
setBounds(200,100,450,380);
add(label,BorderLayout.NORTH);
add(mypanel,BorderLayout.CENTER);
setVisible(true);
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){
System.exit(0);
}
});
}
public static void main(String args[]){
new MyFrame("Je t'amine");
}
}
请各位大神闲暇看一下,/*........*/老说是找不到符号,我在等号后面加上“”就能编译过,就是得不到那功能!