问题:
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。
|