主题:请教
import java.awt.*;
public class Gui
{
private Frame g;
private Button b1;
private Button b2;
public static void main(String args[])
{
Gui that=new Gui();
that.go();
}
public void go()
{
g=new Frame("Gui example");
g.setLayout(new FlowLayout());
b1=new Button("DON'T PRESS!");
g.add(b1);
g.add(b2);
g.pack();
g.setVisible(ture);
}
}
编译错误 :g为无效字符
public class Gui
{
private Frame g;
private Button b1;
private Button b2;
public static void main(String args[])
{
Gui that=new Gui();
that.go();
}
public void go()
{
g=new Frame("Gui example");
g.setLayout(new FlowLayout());
b1=new Button("DON'T PRESS!");
g.add(b1);
g.add(b2);
g.pack();
g.setVisible(ture);
}
}
编译错误 :g为无效字符