I trying to add a special JSpinner to my dialog that a) has the arrows to the right and left of the editor and b) updates the range and increment based on another GUI element.
For (a) I was trying to use the code provided by Darryl Burke
left right spinner
For (b) I was planning to update model.
Here is what I have so far-
This is Darryl's code.
As shown above, I get a GUI with a left-right spinner that works perfectly until I try to change the model,
If I comment out " spinner.setUI( new LeftRightSpinnerUI() );" I lose my left-right spinner, but can change the range and increment without problems.
I've been trying to sort out what I need to get both actions working, but I am somewhat confused about the relationship between the editor, UI and model. I see I can setEditor in JSpinner, but it is being created in LeftRightSpinnerUI and I'm not quite sure why it is recreated if I change the model. Could someone help me understand this better?
For (a) I was trying to use the code provided by Darryl Burke
left right spinner
For (b) I was planning to update model.
Here is what I have so far-
This is Darryl's code.
As shown above, I get a GUI with a left-right spinner that works perfectly until I try to change the model,
If I comment out " spinner.setUI( new LeftRightSpinnerUI() );" I lose my left-right spinner, but can change the range and increment without problems.
I've been trying to sort out what I need to get both actions working, but I am somewhat confused about the relationship between the editor, UI and model. I see I can setEditor in JSpinner, but it is being created in LeftRightSpinnerUI and I'm not quite sure why it is recreated if I change the model. Could someone help me understand this better?