Completing the MyContainer2 Bean

Complete the bean context example in this section by writing the sams.containers.MyContainer2 class shown in Listing 8.6 and compiling it along with the sams.containers.ChildBean and sams.containers.MyContext classes shown in Listings 8.4 and 8.5.

Listing 8.6 Source Code for MyContainer2.java
 package sams.containers; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Panel; import java.awt.Point; import java.awt.TextArea; public class MyContainer2 extends Panel { private int panelWidth = 400; private int panelHeight = 175; public TextArea textService = new TextArea( ); private MyContext myContext = new MyContext( textService ); public MyContainer2( ) { add( textService ...

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.