<Swing Dev> 6303622: Generics: JComboBox: get/setSelectedItem(Object)
Ricardo
thrawnkb at gmail.com
Fri Dec 18 14:53:19 UTC 2009
El 18/12/09 13:59, Pavel Porvatov escribió:
> Hi Ricardo,
>> In the example I attached in the previous thread:
>> - Generified editable combobox was supported *if* the generic class
>> had a constructor: new XXX(String s). It is easy to modify it to
>> accept an empty contructor plus a setter method setName(String s) or
>> whatever
> It looks too tricky to use such generification. Just imagine if the
> java.util.List class was generified in the same way....
>
You are right, it works but is a bit tricky, so probably is valid for a
library, but not for the core java.
> See my example above. Try to implement the same functionality with
> your generification and you'll see that it's harder to done.
>
I see your point. I have no objection to it
--
Ricardo
More information about the swing-dev
mailing list