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

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

1、计算机二级 JAVA-170 (1)及答案解析(总分:100.00,做题时间:90 分钟)一、综合应用题(总题数:3,分数:100.00)1.本程序是一个 Applet,功能是用鼠标来画不同颜色的图形。页面中有 5 个按钮:“画红色图形”、“画绿色图形”、“画蓝色图形”、“橡皮”和“清除”,单击前三个按钮中的一个后,按住鼠标左键或右键在面板中拖动就能画出对应颜色的线条,单击“橡皮”按钮后,按住鼠标左键或右键在面板中拖动,就能将面板中的图形擦除掉,单击“清除”按钮,就能将面板中所有的图形清除掉,如图所示。 (分数:30.00)_2.本程序的功能是监听鼠标对按钮的拖动操作。窗口中有一个按钮,鼠标可

2、以按住按钮在窗口中进行拖动,如图所示。 (分数:30.00)_3.本程序的功能是通过菜单打开一个图像文件。窗口中有一个“File”菜单,其中包括“Open”和“Exit”菜单项,单击“Open”菜单项可弹出一个打开对话框,选中一个图像文件后单击“打开”按钮返回主窗口,则选中的图像文件显示在窗口中。单击“Exit”菜单项可退出程序,如图所示。 (分数:40.00)_计算机二级 JAVA-170 (1)答案解析(总分:100.00,做题时间:90 分钟)一、综合应用题(总题数:3,分数:100.00)1.本程序是一个 Applet,功能是用鼠标来画不同颜色的图形。页面中有 5 个按钮:“画红色图形

3、画绿色图形”、“画蓝色图形”、“橡皮”和“清除”,单击前三个按钮中的一个后,按住鼠标左键或右键在面板中拖动就能画出对应颜色的线条,单击“橡皮”按钮后,按住鼠标左键或右键在面板中拖动,就能将面板中的图形擦除掉,单击“清除”按钮,就能将面板中所有的图形清除掉,如图所示。 (分数:30.00)_正确答案:()解析:第 1 处:extends Applet implements ActionListener,MouseMotionListener 第 2 处:public void paint(Graphics g) 第 3 处:public void actionPerformed(Actio

4、nEvent e)2.本程序的功能是监听鼠标对按钮的拖动操作。窗口中有一个按钮,鼠标可以按住按钮在窗口中进行拖动,如图所示。 (分数:30.00)_正确答案:()解析:第 1 处:button.addMouseListener(this) 第 2 处:e.getSource() instanceof Button 第 3 处:b=(Button)e.getSource()3.本程序的功能是通过菜单打开一个图像文件。窗口中有一个“File”菜单,其中包括“Open”和“Exit”菜单项,单击“Open”菜单项可弹出一个打开对话框,选中一个图像文件后单击“打开”按钮返回主窗口,则选中的图像文件显示在窗口中。单击“Exit”菜单项可退出程序,如图所示。 (分数:40.00)_正确答案:()解析:第 1 处:chooser = new JFileChooser() 第 2 处:setJMenuBar(menuBar) 第 3 处:public void actionPerformed(ActionEvent evt)

展开阅读全文
相关资源
猜你喜欢
  • DIN EN ISO 9886-2004 Ergonomics - Evaluation of thermal strain by physiological measurements (ISO 9886 2004) German version EN ISO 9886 2004《人类工效学 热疲劳的生理学测量评价》.pdf DIN EN ISO 9886-2004 Ergonomics - Evaluation of thermal strain by physiological measurements (ISO 9886 2004) German version EN ISO 9886 2004《人类工效学 热疲劳的生理学测量评价》.pdf
  • DIN EN ISO 9887-1994 Water quality - Evaluation of the aerobic biodegradability of organic compounds in an aqueous medium - Semi-continuous activated sludge method (SCAS) (ISO 9887.pdf DIN EN ISO 9887-1994 Water quality - Evaluation of the aerobic biodegradability of organic compounds in an aqueous medium - Semi-continuous activated sludge method (SCAS) (ISO 9887.pdf
  • DIN EN ISO 9888-1999 Water quality - Evaluation of ultimate aerobic biodegradability of organic compounds in aqueous medium - Static test (Zahn-Wellens method) (ISO 9888 1999) Germ.pdf DIN EN ISO 9888-1999 Water quality - Evaluation of ultimate aerobic biodegradability of organic compounds in aqueous medium - Static test (Zahn-Wellens method) (ISO 9888 1999) Germ.pdf
  • DIN EN ISO 9902-1-2014 Textile machinery - Noise test code - Part 1 Common requirements (ISO 9902-1 2001 + Amd 1 2009 + Amd 2 2014) German version EN ISO 9902-1 2001 + A1 2009 + A2.pdf DIN EN ISO 9902-1-2014 Textile machinery - Noise test code - Part 1 Common requirements (ISO 9902-1 2001 + Amd 1 2009 + Amd 2 2014) German version EN ISO 9902-1 2001 + A1 2009 + A2.pdf
  • DIN EN ISO 9902-2-2014 Textile machinery - Noise test code - Part 2 Spinning preparatory and spinning machinery (ISO 9902-2 2001 + Amd 1 2009 + Amd 2 2014) German version EN ISO 99.pdf DIN EN ISO 9902-2-2014 Textile machinery - Noise test code - Part 2 Spinning preparatory and spinning machinery (ISO 9902-2 2001 + Amd 1 2009 + Amd 2 2014) German version EN ISO 99.pdf
  • DIN EN ISO 9902-3-2014 Textile machinery - Noise test code - Part 3 Nonwoven machinery (ISO 9902-3 2001 + Amd 1 2009 + Amd 2 2014) German version EN ISO 9902-3 2001 + A1 2009 + A2 .pdf DIN EN ISO 9902-3-2014 Textile machinery - Noise test code - Part 3 Nonwoven machinery (ISO 9902-3 2001 + Amd 1 2009 + Amd 2 2014) German version EN ISO 9902-3 2001 + A1 2009 + A2 .pdf
  • DIN EN ISO 9902-4-2014 Textile machinery - Noise test code - Part 4 Yarn processing cordage and rope manufacturing machinery (ISO 9902-4 2001 + Amd 1 2009 + Amd 2 2014) German vers.pdf DIN EN ISO 9902-4-2014 Textile machinery - Noise test code - Part 4 Yarn processing cordage and rope manufacturing machinery (ISO 9902-4 2001 + Amd 1 2009 + Amd 2 2014) German vers.pdf
  • DIN EN ISO 9902-5-2014 Textile machinery - Noise test code - Part 5 Weaving and knitting preparatory machinery (ISO 9902-5 2001 + Amd 1 2009 + Amd 2 2014) German version EN ISO 990.pdf DIN EN ISO 9902-5-2014 Textile machinery - Noise test code - Part 5 Weaving and knitting preparatory machinery (ISO 9902-5 2001 + Amd 1 2009 + Amd 2 2014) German version EN ISO 990.pdf
  • DIN EN ISO 9902-6-2014 Textile machinery - Noise test code - Part 6 Fabric manufacturing machinery (ISO 9902-6 2001 + Amd 1 2009 + Amd 2 2014) German version EN ISO 9902-6 2001 + A.pdf DIN EN ISO 9902-6-2014 Textile machinery - Noise test code - Part 6 Fabric manufacturing machinery (ISO 9902-6 2001 + Amd 1 2009 + Amd 2 2014) German version EN ISO 9902-6 2001 + A.pdf
  • 相关搜索

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

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