A good answer might be:

A suggested answer follows:

Container and its Components

The setBackground( ) method is a member of Repeater (which extends Frame). So to use it in the constructor for Repeater, you just use its name (as below).

public class Repeater extends Frame implements ActionListener
{

   Label inLabel     = new Label( "Enter Your Name:  " ) ;
   TextField inText  = new TextField( 15 );

   Label outLabel    = new Label( "Here is Your Name :" ) ;
   TextField outText = new TextField( 15 );
   
   Repeater()                              // constructor
   {  
      setLayout( new FlowLayout() );       // choose the layout manager 
      add( inLabel  ) ;
      add( inText   ) ;
      add( outLabel ) ;
      add( outText  ) ;

      setBackground( Color.green );
      inText.addActionListener( this );
      outText.setEditable( false );
   }

   . . . . . .
}

The other methods addActionListener( ) and setEditable( ) are members of TextField objects that are contained inside the Repeater container. To use them you have to follow a reference to the particular object, like this:
      outText.setEditable( false );

QUESTION 14:

(Thought question: ) Could a container object (such as Repeater) contain other container objects which in turn contain other components?

Click Here after you have answered the question