Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Swing Binding  RSS feed

Marcel van der Ven
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a question about swingbinding in Java. When I have a entity in Java and this entity´s fields are bind to the fields on the GUI, how can I reset the entity´s fields so that the GUI fields are also reset to the initial values?
At this moment when I save my entity to the database and want to reset the fields in the GUI I make a new instance, but the swingbinding binds to the reference, and now I have to rebind all fields in the GUI to the new instance, is there a easier way to do this? Or am I doing something wrong in the binding?

I now I can make a method to reset all fields, but I have a lot of entity's and some of them have a lot of fields.


It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!