关于java控件问题,不能显示啊
import java.awt.Button;import java.awt.Choice;
import java.awt.Frame;
import java.awt.Label;
import java.awt.TextField;
public class windows
{
public static void main(String[] arg)
{
Frame framel = new Frame("作业");
framel.setSize(400, 300);
framel.setLocation(10, 10);
framel.show();
Button b = new Button("退出");
framel.add(b,"East");
b.setBounds(300,220,50,30);
b.setVisible(true);
b.show();
Label labell = new Label("name");
labell.setLocation(20, 20);
framel.add(labell,"East");
labell.setBounds(50, 30, 30, 30);
labell.setVisible(true);
labell.show();
TextField myTextField = new TextField();
myTextField.setLocation(40, 20);
myTextField.setSize(100, 30);
myTextField.setVisible(true);
myTextField.show();
Choice myChoice = new Choice();
myChoice.add("1");
myChoice.add("2");
myChoice.add("3");
myChoice.setVisible(true);
myChoice.show();
}
}
菜鸟一只,自己写的但是不能显示啊