JCombobox in Java 7 has been updated to use generics - I always thought it was a bit of an oversight that it didn't already so I was pleased to see this change.
However, when attempting to use JCombobox in this way, I realised that the methods I expected to use these generic types still just return Object.
Why on earth is this? It seems like a silly design decision to me. I realise the underlying ListModel has a generic getElementAt()
method so I'll use that instead - but it's a bit of a roundabout way of doing something that appears like it could have been changed on JComboBox itself.