I think you will have to wrap the Vector (or extend the Vector class) in your own class that implements an addListener(...) method and overrides add() etc to broadcast the change event forwarding the change to the the Vector.
This is basically what javax.swing.DefaultListModel does to support JList objects - you may find that a javax.swing.DefaultListModel is all you need.
JamesCherrill
Posting Genius
6,373 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
Yes, that explanation clarifies it. DefaultListModel sounds ideal - it supports a Vector-like data model and was designed for the JList GUI component to track its changes, but the Listener design pattern it uses will work for any other class that wants to know about changes. I doubt you will find a (much) better solution.
JamesCherrill
Posting Genius
6,373 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073