I have a GUI with two JSpinner's and a Spinner Model attached to each of them. When changing one value, the other changes. I suspect this is because I'm using the same model. This is obviously not what I intend to do, is there a better way than creating another Spinner Model with the same value's?

2 Years
Discussion Span
Last Post by JamesCherrill

Because when I give them the same model, when I increase one, it increases the other. Same with decreasing them, or manually editing the value.


I'm confused.
If you want them to change together use one model.
If you wnt them to change independently use two models.
What's the problem?


It just doesn't make sense to me why using one model would make it so that both of them change together. To me, it would be better to do that with code, which is very simple, then create two seperate models with the same values.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.