JAVA期末考试题库 - 百度文库

ÄĸöÇøÓò£¬ÔòËü½«»áĬÈϱ»·ÅÖÃÔÚ£¨ £© a. CENTER 90.ÔÚBorderLayout²¼¾Ö¹ÜÀíÆ÷ÖУ¬ÈôÏ뽫°´Å¥Ìí¼Óµ½´°¿ÚÏ·½£¬Ó¦Ê¹ÓõÄÇøÓòÊÇ£¨ c. SOUTH

91.Èôij¸ö¼àÌý³ÌÐò½Ó¿ÚÖж¨ÒåÁË5ÖÖ³éÏóµÄʼþ´¦Àí·½·¨£¬µ«³ÌÐòÖ»Óõ½ÆäÖеÄÒ»ÖÖ·½·¨£¬ÔòÔÚʵÏָýӿڵÄÀàÖУ¬¿ÉÒÔ£¨ £©

b. ½«²»¸ÐÐËȤµÄ·½·¨ÄÚÈÝÉèΪ¿Õ£¬¶øÖ»¾ßÌåʵÏÖËùÓõ½µÄ·½·¨

92.Òª¸Ä±äÈÝÆ÷µÄ²¼¾Ö¹ÜÀíÆ÷£¬¿ÉÒÔʹÓõķ½·¨ÊÇ£¨ £© c. getContentPane

93.pvΪһJPanelʵÀý£¬ÈôÐ轫Æä²¼¾Ö¹ÜÀíÆ÷ÉèÖÃΪ´¹Ö±·½ÏòµÄBoxLayout£¬Ó¦Ê¹ÓõÄÓï¾äÊÇ£¨ £© c. pv.setLayout(new BoxLayout(pv, BoxLayout.Y_AXIS));

93.¶¥²ãÈÝÆ÷ÖÐÄÚÈÝ´°¸ñµÄĬÈϲ¼¾Ö¹ÜÀíÆ÷ÊÇ£¨ £© b. BorderLayout

94.ÔÚJavaµÄʼþ´¦ÀíÄ£ÐÍÖУ¬Ê¼þ¼àÌý½Ó¿ÚºÍʼþÊÊÅäÆ÷µÄ¹ØϵÊÇ£¨ £©

d. ʼþÊÊÅäÆ÷ÊÇʵÏÖÁËÏàӦʼþ¼àÌý½Ó¿ÚµÄÀֻ࣬ÊÇÏàÓ¦·½·¨µÄʵÏÖÄÚÈÝΪ¿Õ

95.ÒÔÏÂ×é¼þÖУ¬²»ÄÜÊäÈëÎı¾µÄÊÇ£¨ £©b. Jlabel 96.JFileChooser×é¼þµÄ×÷ÓÃÊÇ£¨ £© c. ´´½¨Îļþ¶Ô»°¿ò 97.ÒªÉèÖÃ×é¼þµÄ±³¾°É«£¬ËùÑ¡Óõķ½·¨ÊÇ£¨ £© b.

17

setBackground

98.ÒÔÏÂ˵·¨ÖУ¬ÕýÈ·µÄÊÇ£¨ a. ¶ÔÓÚ¶à¸öJCheckBox¶ÔÏó£¬Èô½«ËüÃǼÓÈëÒ»¸ö°´Å¥×飬ËüÃÇÖ»ÄܽøÐе¥Ñ¡

99.Èô´°ÌåΪframe£¬²Ëµ¥À¸Îªmb£¬ÔòÄÜʵÏÖ½«²Ëµ¥·Åµ½´°¿ÚÉÏ·½µÄÓï¾äÊÇ£¨ £©

a. frame.setJMenuBar(mb);

100.´´½¨×éºÏ¿ò¶ÔÏóºó£¬Òª½«ÆäÉèÖÃΪ¿É±à¼­×éºÏ¿ò£¬²ÉÓõķ½·¨ÊÇ£¨ £© a. setEditable

101.Óï¾ä¡°JDialog d=new JDialog(frame, ¡±information¡±, true);¡±µÄ×÷ÓÃÊÇ£¨ £©

c. ´´½¨Ò»¸ö±êÌâΪinformationµÄģʽ¶Ô»°¿ò£¬¸Ã¶Ô»°¿òΪframeËùÓÐ

102.ÒªÏÔʾµ¯³öʽ²Ëµ¥£¬Ðëµ÷Óõķ½·¨ÊÇ£¨ £© c. show 103.ÒªÏÔʾÌáʾÐÔµÄÎı¾ÐÅÏ¢ºÍͼ±ê£¬¾­³£²ÉÓõÄ×é¼þÊÇ£¨ £© c. JLabel

104.Èç¹ûÁ½¸ö°´Å¥¶¼×¢²áÁËͬһ¸öʼþ´¦Àí³ÌÐò£¬ÔòÒ»°ãÐèҪΪÿ¸ö°´Å¥ÉèÖÃÒ»¸öÃüÁîÃû£¬²¢ÔÚʼþ´¦Àí³ÌÐòÖÐͨ¹ý£¨ £©·½·¨ÅжϲÙ×÷·¢ÉúÔÚÄĸö°´Å¥¶ÔÏóÉÏ¡£ b. getActionCommand

105.ÏÂÁÐÓйØÁбíµÄ˵·¨ÖдíÎóµÄÊÇ£¨ £© b. ÁÐ±í±¾Éí´øÓйö¶¯Ìõ¹¦ÄÜ

106.¶ÔÓÚÇл»°´Å¥JToggleButton£¬¿ÉÒÔͨ¹ý·½·¨£¨ £©»ñµÃ°´

18

Å¥µÄµ±Ç°×´Ì¬¡£ d. isSelected

107.ÔÚÎļþ¶Ô»°¿òÖУ¬µ±Óû§½øÐÐÎļþÑ¡Ôñºó£¬¿ÉÒÔͨ¹ý£¨ £©·½·¨È¡µÃÓû§ËùÑ¡ÔñµÄÎļþ¡£

b. getSelectedFile

108.Òª´´½¨Ò»¸ö¶àÐжàÁеÄÎı¾ÊäÈë¿ò£¬Ó¦Ê¹ÓõÄ×é¼þÊÇ£¨ £© b. JTextArea

109.Èôjcb1ºÍjcb2¾ùΪJComboBox¶ÔÏó£¬ÔòÓï¾ä¡°jcb2.insertItemAt(jcb1.getSelectedItem(), 0)¡±µÄ×÷ÓÃÊÇ£¨ £© c. ½«jcb1µÄµ±Ç°Ñ¡ÔñÏîÌí¼Óµ½jcb2µÄµÚ1¸öλÖã» 110.ÒªÉèÖÃ×é¼þËùʹÓõÄ×ÖÌ壬ËùÑ¡Óõķ½·¨ÊÇ£¨ £© c. setFont

111.¹ØÓÚÃüÁî¡°JTextArea ta\\£½new JTextArea(¡±java swing¡±, 4,30)¡±£¬ÕýÈ·µÄ˵·¨ÊÇ£¨ £©

a. ´´½¨Ò»¸ö4ÐС¢30ÁеÄÎı¾Çø£¬²¢ÏÔʾ³õʼ×Ö·û´®java swing

112.Òª´´½¨Ò»¸öÏÔʾÎı¾Îª¡°¹Ø±Õ¡±µÄ°´Å¥£¬ÕýÈ·µÄÃüÁîÊÇ£¨ £©

a. JButton b d. JButton(¡±¹Ø±Õ¡±); e. new Button(¡±¹Ø±Õ¡±); g. new JButton(¡±¹Ø±Õ¡±); h. new JButton(¹Ø±Õ);

19

1.15.2%5µÄ¼ÆËã½á¹ûÊÇ 0.2 ¡£

20

ÁªÏµ¿Í·þ£º779662525#qq.com(#Ì滻Ϊ@)