ComboBox and Converters


I have a ComboBox which holds a list of possible values retrieved from the DB. The user can select one or write its own. The value should then be stored in a field of a given type of the object which is bound to the view containing that combobox.

I want to use a Converter<String, Type> to convert the selected/written value from the ComboBox to the type. Unfortunately this is not possible since ComboBox is derived from AbstractField, which forces me to implement a Converter<Object, Type>. This works but is imho ugly.

Question: Can I somehow tell the ComboBox that it holds strings (or whatever) and not objects? Wouldn’t it be nice to have a typed ComboBox (in my case ComboBox)?

So maybe, create overrided ComboBox control. I know this is also hacking solution , but in Java you cannot do more.