Submitted On 18-OCT-2004
karmaGfa
I also suggest that you add a the generic type of the nodes of the tree in the JTree, so that only the TreeModel<N> will be used in a JTree<N>.
Submitted On 19-OCT-2004
karmaGfa
I would like to correct also :
void addTreeModelListener(TreeModelListener l);
void removeTreeModelListener(TreeModelListener l);
should be something like :
void addTreeModelListener(TreeModelListener<N> l);
void removeTreeModelListener(TreeModelListener<N> l);
Submitted On 28-DEC-2004
Puce
I also suggest to change the other components and models (like ListModel, CombBoxModel etc.) to use generic types instead of Object.
Submitted On 27-AUG-2005
karmaGfa
Since it is easy to do the changes and since there seems to not be any cons to this RFE, I wonder why it takes so long to have those generics integrated with the API.
When will the generification be applied ? Does somebody have plans to make it for whatever version is not ?
Submitted On 27-AUG-2005
karmaGfa
PS: I agree with Puce, it should also be added to the other container-like GUI components.
Submitted On 18-JAN-2007
msundman
Generification isn't exactly rocket science. Howcome it always takes many years for Sun to do even the simplest things?
Submitted On 04-DEC-2007
Seriously, compared to other APIs, this is not a large change and the benefit is huge. Please do it on ListModel, ComboBoxModel and TreeModel ... that's the really least that can be done on Swing with generics. Swing is clearly not a focused area of the JDK.
Submitted On 05-JUN-2008
Any progress with this?
Submitted On 15-OCT-2008
When are we going to start use generics here? This defect is very old! I hate casting to object :(
Submitted On 25-NOV-2009
Puce
As some of you might already know, some time ago I started the swing-generics project to "generify" the Swing framework.
Now my patch to "generify" JList, along with AbstractListModel, DefaultListCellRenderer, DefaultListModel, ListCellRenderer and ListModel, has been commited to the OpenJDK/ Swing repository!
You can learn more about the patch at the project site:
https://swing-generics.dev.java.net/
or my blog:
http://puces-blog.blogspot.com/2009/11/news-swing-generics-openjdk-jlist-patch.html
If you're interested in the future of Swing and this issue, join the discussions in the OpenJDK Swing mailing list:
http://mail.openjdk.java.net/mailman/listinfo/swing-dev
Related issues:
Sun: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6823603
OpenJDK: https://bugs.openjdk.java.net/show_bug.cgi?id=100029
-Puce
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|