暂未完成的程序,是一个下拉列表,里面有56个民族给你这样,请高人解答在吗会出现错误
Choice choice_nation = new Choice();
choice_nation.add("汉族");
choice_nation.add("傣族");
choice_nation.add("侗族");
提示软件包 choice_nation 不存在
需要<标识符>
非法的类型开始
import java.awt.*;
import java.awt.event.*;
public class T2 extends Frame implements ActionListener,ItemListener
{
Panel panel1 = new Panel(); Label user_name = new Label("用户名");
Label sex = new Label("性别");
Label nation = new Label("民族");
Label marry = new Label("婚否"); TextField user_name_text_field = new TextField("",10); Checkbox man = new Checkbox("男");
Checkbox woman = new Checkbox("女"); Choice choice_nation = new Choice();
choice_nation.add("汉族");
choice_nation.add("傣族");
choice_nation.add("侗族"); Checkbox married = new Checkbox("已婚");
Checkbox unmarried = new Checkbox("未婚"); List information = new List(); Button add = new Button("添加");
public T2()
{
}
}
Choice choice_nation = new Choice();
choice_nation.add("汉族");
choice_nation.add("傣族");
choice_nation.add("侗族");
提示软件包 choice_nation 不存在
需要<标识符>
非法的类型开始
import java.awt.*;
import java.awt.event.*;
public class T2 extends Frame implements ActionListener,ItemListener
{
Panel panel1 = new Panel(); Label user_name = new Label("用户名");
Label sex = new Label("性别");
Label nation = new Label("民族");
Label marry = new Label("婚否"); TextField user_name_text_field = new TextField("",10); Checkbox man = new Checkbox("男");
Checkbox woman = new Checkbox("女"); Choice choice_nation = new Choice();
choice_nation.add("汉族");
choice_nation.add("傣族");
choice_nation.add("侗族"); Checkbox married = new Checkbox("已婚");
Checkbox unmarried = new Checkbox("未婚"); List information = new List(); Button add = new Button("添加");
public T2()
{
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货