Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6303622
Votes 7
Synopsis Use generic in Swing components like JComboBox
Category java:classes_swing
Reported Against
Release Fixed
State 5-Cause Known, request for enhancement
Priority: 4-Low
Related Bugs 6248759 , 6465232
Submit Date 29-JUL-2005
Description
A DESCRIPTION OF THE REQUEST :
Add generics support to Swing components like JComboBox and JList:

JComboBox<String> combo = new JComboBox<String>(...);

String str = combo.getSelectedItem();

JUSTIFICATION :
Type safety in getSelectedItem().

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No cast required for getSelectedItem
ACTUAL -
Does not apply

---------- BEGIN SOURCE ----------
See above
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
casting
Posted Date : 2005-07-29 06:09:55.0
Work Around
N/A
Evaluation
See also 6248759, about generifying spinner.
Posted Date : 2006-09-06 16:38:29.0

Contribution forum : https://jdk-collaboration.dev.java.net/servlets/ProjectForumMessageView?forumID=1463&messageID=13410
Posted Date : 2006-06-08 05:59:09.0
Comments
  
  Include a link with my name & email   

Submitted On 14-JUN-2006
karmaGfa
This RFE is similar to the RFE 6179357, which propose to add genericity to all the other GUI components that can be seen as a data collection container, like JTree, JTable, etc ...


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