I found out recently that JList (finally!) was "generified" in JDK7.
Why JTree and related classes/interfaces 开发者_开发知识库are not changed the same?
It would be a huge improvement. Casting Object is going on one's nerves.
NOTE: The javadoc had not yet been updated, see here and here.
There was someone making proposals on the swing-dev mailing list. I don't think it is complete yet.
My understanding of why it hasn't been generified yet is:
- The API does not fit generics very well (exposing implementation and arrays, for instance).
- Across GUI code, generification brings surprisingly little benefit considered.
- Engineers at Oracle have more business-relevant priorities.
加载中,请稍侯......
精彩评论