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

Java-based (JDBC) data connectivity to SaaS, NoSQL, and Big Data. Download Now.

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

 

Connect any Java based application to your SaaS data.  Over 100+ Java-based data source connectors.

Topics:

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}