Announcement Announcement Module
No announcement yet.
Boolean, Date, Integer Fields on Form Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Boolean, Date, Integer Fields on Form

    I tried experiment today. I added a boolean property to my form object and put object on a form. Good thing is, the field shown as checkbox automaticaly! Very nice to me! 8)

    Now I am wondering, how I can add a date property to form object and have field shown in MyDateControl (a custom JComponent for edit java.util.Date) instead of JTextField? Or maybe I can use JFormattedTextField with date format (but how)?

    How I can add also a Integer property and have it shown in JSpinner?

  • #2
    The PropertyEditorRegistry is your friend here: you can register a custom editor that returns a custom date control for all date properties, for example. Thank Jim Moore for that one! :-)


    • #3
      More info on PropertyEditors: