Containers

JavaBeans containers hold, or contain, Java beans. The java.awt.Container class defines several add() methods for adding components to a container. There are also methods for removing components (the remove() method), getting the number of components held by the container (the getComponentCount() method), and getting an array of all of the components held by the container (the getComponents() method). Each bean sits in a container, and each bean can be a container itself.

Containers, by their very nature, need ways to keep track of the components added to them. Computer scientists have been hard at work for decades on algorithms (sequences of operations) that help manage collections of things in computer programs. The core Java platform ...

Get JavaBeans Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.