Java - JList / DefaultListModel - Quick Question

Associate
Joined
16 May 2004
Posts
55
Location
Herts, Uk
i'm building my first GUI in java so bear with me...

I ahve two Jlist's that both contain DefaultListModel's - what I need to do is link these together, for example if I scroll down in one, I need the other to copy the movement. Is this possible? And if so how?

Thanks
 
Its certainly possible. You can definitely link the two up manually by getting one to eat all the events generated by the other and copy them and vice versa (with some checks in place to ensure you dont get into a loop).

You can probably do it a better way (single underlying class which can be drawin in 2 different places), but I don't have time to think about it properly.
 
Back
Top Bottom