I have this Swing app I'm working on that has a pair of JSliders and JTextFields that both display & control the value of two numbers. Right now I kind of hacked things together to make it work, intercepting change events and updating the display. However I'm thinking a better way would be to make a model that has the two numbers and somehow link this model to my GUI view. I know how to make a model, but am kind of lost on how I could link that to my GUI view... any suggestions?
update: my model is ready + includes firing property changes. I think I would like to use some kind of data binding approach (e.g. JGoodies Binding) but I am not sure how... JGoodies Binding doesn't support sliders.
edit: also note, when the slider changes position, the text field should change its value; when the text field changes value, the slider should change position; and when the model changes value, both text field + slider should update.