The overall structure of a given software system is model view controller. The view (graphical interface) is a representation of the model (domain object models).
However, within the view (graphical interface) there are components (such as JTextComponent). These components too are arranged in Model View Controller. JTextComponent uses Document as its model.
The JTextComponent is meant to represent a specific part of a domain object model. But its model is actually the Document object.
This one piece of information, portrayed by the JTextComponent, is stored both in the JTextComponent Document and in the domain object model. This organisation results in this information of the model being duplicated. And thus the two models need to be kept synchronised. Violation of DRY.
Are there any elegant solutions for binding a JTextComponent (or any graphical Component) to a part of the domain object model, so there truly is one place for the data?