Is there an existing library that automatically creates a Java Swing form from a Properties object (or properties)? that is, it displays 2 columns, as many rows as there are properties, correctly justified. Property names on the left, JTextFields for values ββon the right.
I do not have access to property names (or expected types) at compile time.
In addition, the solution should allow some value fields to be set read-only after construction.
Perfect solution:
- allow you to specify some property values ββas sensitive, requiring a JPasswordField
- provide input format validation, for example. against object type (e.g. URL, Double, etc.)
or type-sensitive, so that the corresponding widget types (or buttons for creating the corresponding widgets) are used instead of the JTextField for standard object types. e.g. JFileChooser for properties that are expected to have a file type, SwingX Select color / date, check number format)
Entering type-specific properties begins to sound like JavaBeans. I would prefer not to go down the JavaBeans route unless there is a really simple rather than a large framework solution for this object, which is Javabean.
(I already know how to do this manually and I can write a simple implementation that ignores sensitivity / type information - anyone who answers these lines will be knocked down! I just want to know if such a beast already exists, a well-preserved library)
UPDATE: Java Beans related - create inspector window
source share