本题程序的功能是使用GridBayLayout来组织窗口上的按钮。窗口中共有7个按钮,前3个按钮放置在第1排,第4个按钮独占第2排,第6个按钮位于第3排的右侧,而第5和第7个按钮共同处于第3排的左侧。请将下述程序补充完整(注意:不得改动程序的结构,不得增行或删行)。 import javax.swing.*; import java.awt.*; import java.awt.event.*; public class simple extends Jframe private JPanel jpanel1=new JPanel(); private GridLayout g1; private JButton JButton1 = new JButton("第一个"); private JButton JButton2 = new JButton("第二个"); private JButton JButton3 = new JButton("第三个"); private JButton JButton4 = new JButton("第四个"); private JButton JButton5 = new JButton("第五个"); private JButton JButton6 = new JButton("第六个"); private JButton JButton7 = new JButton("第七个"); public ______() super("simple"); setSize(300,150); GridBagLayout gbl= ______; jpanell.setLayout(gbl); GridBagConstraints gbc = new GridBagConstraints(); gbc.fill = GridBagConstraints.BOTH; gbc.gridwidth = 1; gbc.gridheight = 1; gbc.gridx = 0; gbc.gridy = 0; jpanell.add(JButtonl,gbc); gbc.gridx = 1; jpanell.add(JButton2,gbc); gbc.gridx = 2; jpanell.add(JButton3,gbc); gbc.gridx = 0; gbc.gridy = 1; gbc.gridwidth = 3; jpanell.add(JButton4,gbc); gbc.gridy = 2; gbc.gridwidth = 1; jpanell.add(JButton5,gbc); gbc.gridx = 1; gbc.gridwidth = 2; gbc.gridheight = 2; jpanell.add(JButton6,gbc); gbc.gridx = 0; gbc.gridy = 3; gbc.gridwidth = 1; gbc.gridheight = 1; jpanell.add(JButton7,gbc); this.setContentPane (jpanel1); public static void main (String args[]) simple fgl= new simple(); fgl.show(); fgl.addWindowListener(new WindowAdapter() public void windowClosing(WindowEvent e) System.exit(0); );
查看答案
有人欲比较A、B两种降压药物的降压效果,随机抽取了高血压病人各100名,据测量值算得两组病人服药前后舒张压下降值的平均数分别为0.45kPa(3.375 mm- Hg)和0.34kPa(2.55mmHg)。作两大样本u检验得u=6.306,P<0.001,结论是
A. 两样本均数不相等
B. 两种降压药物的降压效果相差很大
C. A药的临床疗效比B药好
D. 统计学上认为丽总体均数不相等
E. 两种降压药物的降压效果差别是由偶然误差产生的,所以无统计学意义
Dear Manager, After a serious consideration, I have a definite decision on resigning from the department effectively on December 31. I think you really understand my decision in view of my personal financial problems. I feel that greater opportunities would be available to me to cope with these problems in some other companies. My three years working with you and my colleagues have been very pleasant and have provided a great challenge. I enjoy working with you, and I regret very much the necessity of leaving the department only because of my extreme economic pressures. Before my leaving, I will certainly help in training the person you select to fill my position. If at any future time a problem should arise, I shall be happy to assist in any way I can. Yours truly, Charlie Smith What kind of impression does the department make on Mr. Charlie Smith A ______.
Letter One Richard Thomas and Baldwin Ltd 151 Gower Street London, SCI, England P.O. Box No: 164 London, England June 18, 1997 Dear Sir or Madam, In answer to your Want Ads, as in today’s "Daily Mirror" for an engineer of bridge building, I beg to offer myself as a candidate for the post. My qualifications are as follows: Age: thirty Place of Birth: London Education: Civil Engineering College graduate Experience: Five years’ bridge engineer with Mr. Evans Smith, General Manager of the University Railway Co. Salary desired: £1,500 a month If these meet your requirements, please grant me an interview. Thank you in advance for your early reply. Yours sincerely, Edward Swift Letter Two To the Department Office, I was the last to leave the classroom last night and forgot to close one of the northern windows. After midnight, it blew very hard. As a result, three windowpanes (窗框) were broken. I have reported the case to the Repairs Section of the General Affairs Department, asking them to send someone over to put things in order. I am prepared to bear all the costs arising out of the incident, and promise to avoid any repetition of such things in the future. Yours sincerely, Li Hua Student of Class One, Grade Three What is the writer prepared to do with the incident To pay for ______ caused by the incident.
No.1 Notice All the students of the Department of Foreign Languages are requested to meet in the First Hall on Friday(May,7) at 2:00 p. m. to hear a report on modern American education to be given by the visiting American Professor, Mr. Adam Black. May 4,2006 No. 2 Notice Teachers’ Reading Group Meeting Thursday, Sept. 14, 8 p. m. General Conference Room, Greer School "How to Handle with Hyperactive Child" Billie Smith will present new information to help you cope with this important problem. Sept.12, 2006 Where will Mr. Adam Black give the report At ______.