【计算机类职业资格】计算机二级JAVA-100及答案解析.doc

上传人:roleaisle130 文档编号:1338144 上传时间:2019-10-17 格式:DOC 页数:2 大小:40KB
下载 相关 举报
【计算机类职业资格】计算机二级JAVA-100及答案解析.doc_第1页
第1页 / 共2页
【计算机类职业资格】计算机二级JAVA-100及答案解析.doc_第2页
第2页 / 共2页
亲,该文档总共2页,全部预览完了,如果喜欢就下载吧!
资源描述

1、计算机二级 JAVA-100 及答案解析(总分:100.00,做题时间:90 分钟)一、综合应用题(总题数:3,分数:100.00)1.本程序的功能是用下拉菜单来设置显示日期和时间的格式。程序中有一个下拉菜单和一个文本框,在下拉菜单中选中某种格式,则对应的文本框中显示该格式的日期或时间,也可以在下拉菜单中输入日期或时间的格式字符串,直接回车,文本框中可显示对应格式的日期或时间,如果输入格式错误,则显示提示信息,如图所示。 (分数:33.00)_2.本程序的功能是获取列表中各项的选择。窗口中有一个列表、两个按钮和一个文本域,列表中的列表项是复选框,选中一些列表项,单击“print”按钮,则在文本

2、域中添加选中的列表项的名称,单击“clear”按钮,则清空文本域中的内容,如图所示。 (分数:33.00)_3.本程序的功能是用菜单控制字符串的显示。窗口中有“File”和“Format”菜单,“File”中有“About”和“Exit”菜单项,单击“About”菜单项弹出一个消息对话框,单击“Exit”菜单项退出程序。“Format”菜单中有“Color”和“Font”菜单项,“Color”菜单项的子菜单项用来设置字符串的颜色,“Font”菜单项的子菜单项用来设置字符串的样式,如图所示。 (分数:34.00)_计算机二级 JAVA-100 答案解析(总分:100.00,做题时间:90 分钟)

3、一、综合应用题(总题数:3,分数:100.00)1.本程序的功能是用下拉菜单来设置显示日期和时间的格式。程序中有一个下拉菜单和一个文本框,在下拉菜单中选中某种格式,则对应的文本框中显示该格式的日期或时间,也可以在下拉菜单中输入日期或时间的格式字符串,直接回车,文本框中可显示对应格式的日期或时间,如果输入格式错误,则显示提示信息,如图所示。 (分数:33.00)_正确答案:()解析:第 1 处:patternList.setEditable(true) 第 2 处:String newSelection = (String)cb.getSelectedItem() 第 3 处:frame.set

4、ContentPane(new advance()2.本程序的功能是获取列表中各项的选择。窗口中有一个列表、两个按钮和一个文本域,列表中的列表项是复选框,选中一些列表项,单击“print”按钮,则在文本域中添加选中的列表项的名称,单击“clear”按钮,则清空文本域中的内容,如图所示。 (分数:33.00)_正确答案:()解析:第 1 处:final JList list = new JList( createData(strs) ) 第 2 处:private Checkableltem createData(String strs) 第 3 处:class CheckListRendere

5、r extends JCheckBox implements ListCellRenderer3.本程序的功能是用菜单控制字符串的显示。窗口中有“File”和“Format”菜单,“File”中有“About”和“Exit”菜单项,单击“About”菜单项弹出一个消息对话框,单击“Exit”菜单项退出程序。“Format”菜单中有“Color”和“Font”菜单项,“Color”菜单项的子菜单项用来设置字符串的颜色,“Font”菜单项的子菜单项用来设置字符串的样式,如图所示。 (分数:34.00)_正确答案:()解析:第 1 处:setJMenuBar( bar ) 第 2 处:for (int i=0; i styleNames.length; i+ ) 第 3 处:class StyleHandler implements ItemListener

展开阅读全文
相关资源
猜你喜欢
  • BS EN 14909-2012 Flexible sheets for waterproofing Plastic and rubber damp proof courses Definitions and characteristics《防水挠性薄板 塑料和橡胶防潮层 定义和特性》.pdf BS EN 14909-2012 Flexible sheets for waterproofing Plastic and rubber damp proof courses Definitions and characteristics《防水挠性薄板 塑料和橡胶防潮层 定义和特性》.pdf
  • BS EN 14912-2015 LPG equipment and accessories Inspection and maintenance of LPG cylinder valves at time of periodic inspection of cylinders《液化石油气体(LPG)设备和附件 汽缸周期性检查时液化石油气体(LPG)汽缸阀.pdf BS EN 14912-2015 LPG equipment and accessories Inspection and maintenance of LPG cylinder valves at time of periodic inspection of cylinders《液化石油气体(LPG)设备和附件 汽缸周期性检查时液化石油气体(LPG)汽缸阀.pdf
  • BS EN 14915-2013 Solid wood panelling and cladding Characteristics evaluation of conformity and marking《实心木质镶板和贴面层 特征、合格评定和标记》.pdf BS EN 14915-2013 Solid wood panelling and cladding Characteristics evaluation of conformity and marking《实心木质镶板和贴面层 特征、合格评定和标记》.pdf
  • BS EN 14916-2005 Domestic cookware - Graphical symbols (pictograms)《家用烹饪用具 图形符号》.pdf BS EN 14916-2005 Domestic cookware - Graphical symbols (pictograms)《家用烹饪用具 图形符号》.pdf
  • BS EN 14931-2006 Pressure vessels for human occupancy (PVHO) - Multi-place pressure chambers for hyperbaric therapy - Performance safety requirements and testing《载人高压氧仓(PVHO) 高压治疗用.pdf BS EN 14931-2006 Pressure vessels for human occupancy (PVHO) - Multi-place pressure chambers for hyperbaric therapy - Performance safety requirements and testing《载人高压氧仓(PVHO) 高压治疗用.pdf
  • BS EN 14933-2007 Thermal insulation and light weight fill products for civil engineering applications - Factory made products of expanded polystyrene (EPS) - Specification《土木工程用隔热和.pdf BS EN 14933-2007 Thermal insulation and light weight fill products for civil engineering applications - Factory made products of expanded polystyrene (EPS) - Specification《土木工程用隔热和.pdf
  • BS EN 14934-2007 Thermal insulation and light weight fill products for civil engineering applications - Factory made products of extruded polystyrene foam (XPS) - Specification《土木工.pdf BS EN 14934-2007 Thermal insulation and light weight fill products for civil engineering applications - Factory made products of extruded polystyrene foam (XPS) - Specification《土木工.pdf
  • BS EN 14935-2006 Copper and copper alloys - Determination of impurities in pure copper - ETA-AAS method《铜和铜合金 测定纯铜杂质 ETA-AAS法》.pdf BS EN 14935-2006 Copper and copper alloys - Determination of impurities in pure copper - ETA-AAS method《铜和铜合金 测定纯铜杂质 ETA-AAS法》.pdf
  • BS EN 14936-1-2006 Copper and copper alloys - Determination of aluminium content - Titrimetric method《铜和铜合金 铝含量的测定 滴定法》.pdf BS EN 14936-1-2006 Copper and copper alloys - Determination of aluminium content - Titrimetric method《铜和铜合金 铝含量的测定 滴定法》.pdf
  • 相关搜索

    当前位置:首页 > 考试资料 > 职业资格

    copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
    备案/许可证编号:苏ICP备17064731号-1