Andreas Svenkson wrote:I've just tried modifying my code to use a Vector instead of a DefaultListModel, but I have a problem where it seems the JList will not update - presumably because as the description for the Vector-constructor implies - the ListModel constructed is read-only and will not respond to changes in the Vector it was based on. That kind of defeats the purpose for using a Vector in the first place doesn't it? I guess I'm back to using the DefaultListModel since optimization isn't the highest priority for me right now.
As for the generics, I think I'll just forget about them and suppress the warnings I get from Eclipse.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
I've just tried modifying my code to use a Vector instead of a DefaultListModel,
Andreas Svenkson wrote:
Well right now I have removed my JList and am using a JTree instead, but the warning came from for example:
...with the warning: "JList is a raw type. References to generic type JList<E> should be parameterized."
// Andreas
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions