DefaultListModel « cast « Java Data Type Q&A





2. Casting from a ListModel into a DefaultListModel in Java 7    stackoverflow.com

How can I cast a ListModel to a DefaultListModel??! I perform the following and I get this error message,

DefaultListModel portalListModel = (DefaultListModel) portalList.getModel();

C:\Documents and Settings\...\myfile.java:728: warning: [rawtypes] found raw ...

3. DefaultListModel casting problem    forums.oracle.com

Myself, I can't really tell where your problem is without more code. You may wish to create a Short, Self Contained, Correct (Compilable), Example or SSCCE. This is a small application that you create that is compilable and runnable, and demonstrates your error, but contains no extraneous, unnecessary code that is not associated with your problem. To see more about this ...