A.frame是window类的直接子类
B.frame对象显示的效果是一个窗口
C.frame被默认初始化为可见的
D.frame的默认布局管理器为borderlayout
次数,请完成程序。
Import java.awt.*;
Import javax.swing.*;
Import java.awt.event.*;
Class myFrame. extends JFrame. implements ActionListener
{
JButtonbutton;
JLabellabel;
myFrame(Strings)
{
super(s);
Containercon=();
setLayout(newFlowLayout());
setDefaultCloseOperation(JFrame.EXIT()ON()CLOSE.;
setSize(300,400);
button=newJButton("OK");
label=newJLabel("0");
con.add(button);con.add(label);
button.addActionListener(this);
setVisible(true);
}
Public void action Performed(ActionEvent e)
{
intn=();
n++;
label.setText(""+n);
}
}
Public class C2801
{
Public static void main(String[] args)
{
new myFrame("我的窗口");
}
}
A.publicperson()
B.publicPerson()
C.publicvoidPerson()
D.publicPerson(int age)
A.A.<frame nosize>
B.B.<frame noresize>
C.C.<frame resize>
D.D.<frame notresize>
A.﹤HTML﹥ ﹤head﹥„﹤/head﹥ ﹤frame﹥„﹤/frame﹥ ﹤/HTML﹥
B.﹤HTML﹥ ﹤head﹥„﹤/head﹥ ﹤body﹥„﹤/body﹥ ﹤/HTML﹥
C.﹤HTML﹥ ﹤title﹥„﹤/title﹥ ﹤frame﹥„﹤/frame﹥ ﹤/HTML﹥
D.﹤HTML﹥ ﹤title﹥„﹤/title﹥ ﹤body﹥„﹤/body﹥ ﹤/HTML﹥
A.htmlhead./headframe./frame/html
B.htmltitle./titlebody./body/html
C.htmltitle./titleframe./frame/html
D.htmlhead./headbody./body/html