当前位置:IT认证>软件水平

问题:[选择题]

[单项选择题] 下列方法与Applet显示无关的是______。


A.paint()
B.update()
C.draw()
D.repaint()

参考答案: C

  参考解析

本题考查Applet的基本概念。Applet显示相关的方法主要有3个。paint()方法,具体执行Applet的绘制,定义为:publicvoidpaint(Graphicsg);update()方法,定义为:publicvoidupdate(Graphicsg),主要用于更新Applet的显示;repaint()方法,定义为:publicvoidrepaint(),主要用于Applet的重新显示,它调用update()方法实现对Applet的更新。而draw()方法与显示无关。故选C。

微信端