1 /* Copyright (C) 1999 Cygnus Solutions
3 This file is part of libjava.
5 This software is copyrighted work licensed under the terms of the
6 Libjava License. Please consult the file "LIBJAVA_LICENSE" for
11 /* A very incomplete placeholder. */
13 public abstract class Container
extends Component
16 Component
[] components
;
18 public Component
[] getComponents()
20 Component
[] result
= new Component
[componentCount
];
21 if (componentCount
> 0)
22 System
.arraycopy(components
, 0, result
, 0, componentCount
);
26 public Component
getComponent (int n
)
28 if (n
< 0 || n
>= componentCount
)
29 throw new ArrayIndexOutOfBoundsException("no such component");
33 public boolean isAncestorOf (Component comp
)
41 comp
= comp
.getParent();
45 public Component
add (String name
, Component comp
)
51 public void addNotify ()
53 for (int i
= componentCount
; --i
>= 0; )
54 components
[i
].addNotify();
57 public void setLayout (LayoutManager layout
)