O'Reilly logo

JavaBeans Unleashed by Rick Leinecker, Dr. Donald Doherty

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required