Results 1 to 1 of 1
- 08-14-2010, 10:09 AM #1
Member
- Join Date
- Aug 2010
- Posts
- 1
- Rep Power
- 0
Changing binding when changing the underlying model object
I make a form, to display & edit user information, say "userForm". The form contains an underlying user object model "user", and binds, for example, JTextField userName to the underlying field of the user model, user.name.
However, when a new user is selected, and I call "userForm.setUser(user2);", I would like obviously to bind the JTextField userName to the new user model member of userForm, but of course the bindings stay attached to the original user model object.
Is there any straightforward way to change the bindings generated from Netbeans? I could do it all manually by adding and removing listeners in the setUser method, but I'm hoping for something more elegant and straightforward. It must be a common use case....
Similar Threads
-
Changing Cursor
By ridvan in forum AWT / SwingReplies: 2Last Post: 06-27-2010, 04:11 AM -
Changing Project Name
By nvts in forum NetBeansReplies: 1Last Post: 05-06-2010, 12:36 AM -
netbeans: changing an object from within an action
By flok in forum AWT / SwingReplies: 3Last Post: 01-23-2010, 02:44 PM -
Color-changing model
By higuchi in forum New To JavaReplies: 1Last Post: 03-19-2009, 07:29 AM -
Changing the Jframe
By Nemo1959 in forum New To JavaReplies: 13Last Post: 09-19-2008, 03:58 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks