首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下面是用户程序对Applet类中方法paint()的重新定义,请在横线处填入正确的语句。 public void paint(Graphics g) {g.【 】(“你好!”,10,20);}
下面是用户程序对Applet类中方法paint()的重新定义,请在横线处填入正确的语句。 public void paint(Graphics g) {g.【 】(“你好!”,10,20);}
admin
2010-02-22
24
问题
下面是用户程序对Applet类中方法paint()的重新定义,请在横线处填入正确的语句。
public void paint(Graphics g)
{g.【 】(“你好!”,10,20);}
选项
答案
drawstring
解析
AWT的绘图机制主要涉及三个方法:paint()方法、update()方法和repaint()方法。其中,update()方法和paint()方法都有一个Graphics类参数。Graphics类有许多绘图的方法,在本题中应该用绘制文本的drawstring (string,x,y)方法。即在Applet窗口(x,y)坐标处写字符串string。
转载请注明原文地址:https://kaotiyun.com/show/Fb9p777K
本试题收录于:
二级Java题库NCRE全国计算机二级分类
0
二级Java
NCRE全国计算机二级
相关试题推荐
假设在数据库表的表设计器中,字符型字段“性别”已被选中,正确的有效性规则设置是()。
下列叙述中正确的是()。
执行如下命令序列后,最后一条命令的显示结果是()。DIMENSIONM(2,2)M(1,1)=10M(1,2)=20M(2,1)=30M(2,2)=40?M(2)
一个关系中属性个数为1时,称此关系为______。
已知数据表A中每个元素距其最终位置不远,为节省时间,应采用的算法是______。
由两个栈共享一个存储空间的好处是______。
线性表若采用链式存储结构时,要求内存中可用存储单元的地址______。
在算法正确的前提下,评价一个算法的两个标准是()。
希尔排序法属于哪—种类型的排序法______。
可以把具有相同属性的一些不同对象归类,称为()。
随机试题
吸气肌
患者女性,73岁,胸痛,呼吸困难,活动性心悸近1个月余,既往冠心病病史,行肺灌注显像示:右肺下叶灌注缺损,余肺段灌注未见明显异常;肺通气显像示:双肺通气未见明显异常。故应考虑为
口角歪斜半身不遂者多是肢体软弱行动不灵多是
我国签发的《ATA单证册》应用()语言印刷。若该货物在展销会结束后没有按时复运出境,我国海关应向()提出索赔。
地处县城的某建筑工程公司具备建筑业施工(安装)资质,2005年发生经营业务如下:(1)总承包一项工程,承包合同记载总承包额9000万元,其中建筑劳务费3000万元,建筑、装饰材料6000万元。又将总承包额的三分之一转包给某安装公司(具备安装资质),转包
社区协管权是指政府()重心下移后,需要由社区协助政府办理一些行政事务。
[2010年]曲线y=x2与曲线y=alnx(a≠0)相切,则a=().
确定常数a,b,c,使得=c.
在测控系统中,为了保存现场高速采集的数据,最佳使用的存储器是( )。
KaleidoscopebyEmmaGrahamAfterastressfulweekatwork,itisalwaysnicetodropbythespatorelaxandrecharge.Formore
最新回复
(
0
)