O'Reilly logo

Core Java® Volume II—Advanced Features, Ninth Edition by Gary Cornell, Cay S. Horstmann

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

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

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