0 Replies Latest reply: Aug 26, 2009 5:53 AM by 843807 RSS

    Providing a set of options for a particular property

    843807
      Hi,

      I am trying to create a simple JavaBean. However I would like to provide a set of options for one of the properties. For example, one of the properties of the JTextField is horizontalAlignment which can have a value of RIGHT, LEFT, CENTRE, etc. In netbeans these options are displayed in a dropdown box. My question is; how can I do the same for my component? (i.e. - provide a set of valid options).

      I did some research and found this:
      http://java.sun.com/docs/books/tutorial/javabeans/customization/index.html

      However not sure if this is the right way (or only way) to do it.

      Regards,
      Sim085