新闻资讯 > JAVA常见问题解答(十二)
                                                                                      
     【发表日期】:2007年10月8日   【出处】:思达网校    【作者】:思达网校   【阅读】:

问题:

The Container methods add( Component comp ) and add( String name, Component comp ) will throw an IllegalArgumentException if comp is a:

A. button

B. list

C. window

D. textarea

E. container that contains this container


回答

ABD显而易见是正确的。
Container有两个主要类型:Window和Panel。Window是显示屏上独立的本机窗口,它独立于其它容器。E也是显然的问题,一个Container当然不能包含container that contains this container。

咨讯评论
相关连接
 
网校预告
联系方式
 免费咨询电话:1169865432

 电 话:023-65472523

 课程咨询:edu@staredu.net
 联系人:李老师 王老师
文章搜索: