A good answer might be:

A suggested answer follows:


Background Color

The setBackground() method is a member method of the content panel of the frame. So to use it in the constructor for Repeater, you must first get the content panel (as below).

   public Repeater()      // constructor
   {  
      getContentPane().setLayout( new FlowLayout() ); 
      getContentPane().add( inLabel  ) ;
      getContentPane().add( inText   ) ;
      getContentPane().add( outLabel ) ;
      getContentPane().add( outText  ) ;
      getContentPane().setBackground( Color.green );

      outText.setEditable( false );
      inText.addActionListener( this );
   }

   . . . . . .



QUESTION 15:

(Thought question:) How do you set the background color of a text field?