简答题:本题是一个Applet,它的功能是在窗口上添加12×12个标签,并且横向和纵向标签的颜色为黑白相间。 import ja

  • 题目分类:Java
  • 题目类型:简答题
  • 号外号外:注册会员即送体验阅读点!
题目内容:
本题是一个Applet,它的功能是在窗口上添加12×12个标签,并且横向和纵向标签的颜色为黑白相间。
import java.applet.*;
import java..awt.*;
import java,.awt.event*;
pubhc class java2
extends Applet
{GridLayout grid;
pubhc void init()
{grid=new GridLayout(12,12);
setLayout(grid);
Label =new Label[12][12];
for(int i=0;i<12;i++)
{for(int j=0;j<12;j++)
{label[i][j]=
if((i+j)%2= =0)
label[i][j].setBackground(Color.black);
else
label[i][j].setBackground(color.white);
add(label[i][j]);
}
}
} }
参考答案:
答案解析:

The twins__________American girls.They are in__________class

The twins__________American girls.They are in__________class. A.are;the same B.i

查看答案

It’s a bird.But I don’t know__________name.

It’s a bird.But I don’t know__________name. A.it B.his C.its

查看答案

Where are they probably talking?

Where are they probably talking?A.In a shop. B.In a hotel. C.In a hospital.

查看答案

26.

26. A.searches for B.stores up C.gives away D.puts on

查看答案

12. Only by increasing the number of doctors by 50 percent

12. Only by increasing the number of doctors by 50 percent properly in this ho

查看答案