firing an event as soon as value (in SpinnerNumber model) is deleted
I have created hours and minutes using JSpinner()(SpinnerNumberModel).
private JSpinner spHrs;
private JSpinner spMin;
this.spHrs = new JSpinner();
this.spMin= new JSpinner();
this.spHrs.setModel(new SpinnerNumberModel(0, 0, 999, 1));
this.spMin.setModel(new SpinnerNumberModel(0, 0, 59, 1);;
User is required to select hours(range 1-999) and min(range 1-59) and then click save.
Problem is that whenever user deletes any value in spHours model,and then click save
the original value is restored since the spHours(or spMinutes) cannot take any null value or any alphanumeric value.
whenever user deletes any value in sphrs or spMin, a dialog box should appear asking "Do you want to restore the original value or replace the vaue with 0"
Anyway my problem is that,I am not able to fire any event on deleting the value,it gets restored as soon as I go to change the value of spmin and vice versa?
Any help is highly appreciated..