Hi,
I have this JList (say MyList) in a JFrame. Im using Netbeans6 GUI builder and I've set a binding for this list.
When run, the binding works fine, and MyList is populated correctly.
Now, what im looking for is a way to add more data to this list from another text box on a button Click. But the problem exists here :
W/o binding i would extract the ListModel for the JList using "getModel()" function and add element to it using "addElement()".
However, when im using Binding. and i try to extract the ListModel and Map it to DefaultListModel i get the following exception:
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: org.jdesktop.swingbinding.JListBinding$BindingListModel cannot be cast to javax.swing.DefaultListModel
So my question is , how do i add more elements to MyList which is already bound to some other dataSource ?
Anyone has any clues ? Any Help will greatly appreciated!!
Thanks!