Based on an answer from this thread, I have found the solution to be
- Right click on the combo box, select
Properties
- Select '
...
' next to model - In the combo box menu on top of the window, select
Custom code
for 'SetyourComboBox
'smodel
property using:' - Enter
new DefaultComboBoxModel(YourEnum.values())
into the given text field. - Press 'OK' and 'Close'
- Switch to the 'Source' tab and make sure that
DefaultComboBoxModel
andYourEnum
are imported.
Unfortunately, this doesn't seem to show the values of the combo box in the 'Preview Design' view, but it does show the values if you embed your component into another component (e.g. if you defined your combo box as a part of a panel and you later add that panel to another panel).