Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Predefined Property Editors for Swing Applications

DZone's Guide to

Predefined Property Editors for Swing Applications

· Java Zone ·
Free Resource

Take 60 minutes to understand the Power of the Actor Model with "Designing Reactive Systems: The Role Of Actors In Distributed Architecture". Brought to you in partnership with Lightbend.

One of the hidden gems of the NetBeans RCP is its set of predefined Property Editors. For example, if you have a business object that uses java.awt.Color as one of its properties, the Properties window (and other related components, such as the OutlineView), will show a predefined editor so that the user can edit the colors, without you having to define the editor for doing so:

 

But that's not all, as the related documentation reveals. There are similar dedicated property editors for all the following properties:

  • java.lang.Boolean
  • java.awt.Color
  • java.awt.Dimension
  • java.awt.Font
  • java.awt.Insets
  • java.lang.Integer
  • java.awt.Point
  • java.awt.Rectangle
  • java.io.File
  • java.lang.Class
  • java.lang.String
  • java.net.URL
  • java.util.Date
  • java.util.Properties
  • javax.swing.ListModel
  • javax.swing.table.TableModel

However, note the warning in the link above about these property editors: "Beware that some of these editors may not provide the ability to edit the full range of values of the corresponding data type, as they may be specialized for the NetBeans environment."

 

Learn how the Actor model provides a simple but powerful way to design and implement reactive applications that can distribute work across clusters of cores and servers. Brought to you in partnership with Lightbend.

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}