作业帮 > 综合 > 作业

g.fillRect(0,0,size.width,size.border="1" Height); java新手,

来源:学生作业帮 编辑:搜搜考试网作业帮 分类:综合作业 时间:2024/05/05 04:12:56
g.fillRect(0,0,size.width,size.border="1" Height); java新手,
最好能举个java例子
g.fillRect(0,0,size.width,size.border=
填充矩形的原方法应该是:public void fillRect(int,int int,int );4个参数的意思分别为,起始X坐标,起始Y坐标,宽度,高度.
而你这一句g.fillRect(0,0,size.width,size.border="1" Height);传的参数明显是有错误的.
size.border="1" 是这字符串变量
你的正确写法应该是g.fillRect(0,0,size.width,size.height);