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:
However not sure if this is the right way (or only way) to do it.