Great news from the OpenJDK swing-generics project: my patch to "generify" JList, along with AbstractListModel, DefaultListCellRenderer, DefaultListModel, ListCellRenderer and ListModel, has been commited to the OpenJDK/ Swing repository!
This patch helps writing more stable code.
Eg. instead of writing something like:
with this patch you can write now:
JList.getSelectedValues(): Object has been deprecated and replaced with:
Have a look at the jtreg tests to see more examples.
If you're interested in the future of Swing, join the discussions in the OpenJDK Swing mailing list.