Cover Page by Gary Cornell, Cay S. Horstmann

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

8.7.1. Writing Property Editors

Before we get into the mechanics of writing property editors, we should point out that an editor is under the control of the builder, not the bean. When the builder displays the property inspector, it carries out the following steps for each bean property:

1. It instantiates a property editor.

2. It asks the bean to tell it the current value of the property.

3. It then asks the property editor to display the value.

A property editor must supply a no-argument constructor, and it must implement the PropertyEditor interface. You will usually want to extend the convenience PropertyEditorSupport class that provides default versions of these methods.

For every property editor you write, choose one of three ways to display ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required