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

Providing a Bean Customizer

Provide beans with graphical user interfaces for easy configuration by creating an associated object implementing the java.beans.Customizer interface. A bean customizer goes beyond property editors by providing an easy-to-use graphic interface for changing a wide range of bean options. Create your own customizer interfaces, or use some of the standard interfaces provided by the Java platform. In this section, you write a simple bean that supplies a customizer interface for choosing its background colors using the standard javax.swing.JColorChooser class.

Creating a Bean

You can associate a customizer with any Java bean. For this example, create a bean that displays the word "Hello" on a small piece of canvas. The source ...

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