Topic: [求助]layout题目一道 |
Print this page |
1.[求助]layout题目一道 | Copy to clipboard |
Posted by: zip Posted on: 2002-08-02 13:43 Which statement is true? A. A grid bag layout can position components such that they span multiple rows and/or columns. B. The “North” region of a border layout is the proper place to locate a menuBar component in a Frame. C. Components in a grid bag layout may either resize with their cell, or remain centered in that cell at their preferred size. D. A border layout can be used to position a component that should maintain a constant size even when the container is resized. Answer: A C好像也是对的?错在哪里啊? |
2.回复: 求助 [Re: zip] | Copy to clipboard |
Posted by: yamakasy Posted on: 2002-08-02 22:23 你好,gridbaglayout这种布局格式,是在gridlayout的基础上进化而来的,其实gridbaglayout是通过创建一些静态的grid的cell来分配空间,具体的是通过你的指定来决定有多少cell,所以基本原理还是gridlayout,这个题目中 c的remain centered in that cell at their preferred size不对,其中preferred size意思是你指定的大小 个人观点,请多指教 |
3.回复: 求助 [Re: zip] | Copy to clipboard |
Posted by: smartzhao Posted on: 2002-08-03 02:55 zip wrote: 去查API这种问题自己就能解决的!!! |
4.回复: 求助 [Re: zip] | Copy to clipboard |
Posted by: zip Posted on: 2002-08-03 09:55 大家好! remain centered in that cell at their preferred size中的preferred size我觉得应该是合适的大小的意思,并不是说指定的大小。 我也看过api,但是还是不知道错在哪才来这里请教大家的。请各位大虾赐教! |
5.回复: 求助 [Re: zip] | Copy to clipboard |
Posted by: yamakasy Posted on: 2002-08-03 10:28 preferred size是合适的大小的意思,它主要是有装载它的layout managerr决定,比如说一个Button填充了3个grid如何能做到remain centered in that cell at their preferred size. |
6.回复: 求助 [Re: zip] | Copy to clipboard |
Posted by: zip Posted on: 2002-08-03 11:16 但是题目中是说“may“可以,而不是说一定是这样。 当一个component放在一个cell中就没问题啊。可以通过设置fill的值来实现c中所说的那样。 |
7.回复: 求助 [Re: zip] | Copy to clipboard |
Posted by: yamakasy Posted on: 2002-08-03 11:45 我对这个题目是有点理解不透彻! Components in a grid bag layout may either resize with their cell, or remain centered in that cell at their preferred size 这个either or因该是 :不是... 就是...的意思吧!所以。。 |
8.回复: 求助 [Re: zip] | Copy to clipboard |
Posted by: zip Posted on: 2002-08-03 11:59 谢谢了,始终觉得那个may either... or... 不是很明白。 |
9.回复: 求助 [Re: zip] | Copy to clipboard |
Posted by: yamakasy Posted on: 2002-08-03 12:03 没想到原因全都在英语上啊! |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |