Guest User

Untitled

a guest
Sep 14th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. Set step for a DateEditor in a JSpinner
  2. SpinnerNumberModel(value, min, max, step);
  3.  
  4. JSpinner timeSpinner = new JSpinner( new SpinnerDateModel() );
  5. DateEditor timeEditor = new DateEditor(timeSpinner, "HH:mm:ss");
  6. timeSpinner.setEditor(timeEditor);
  7. timeSpinner.setValue(new Date()); // will only show the current time
Add Comment
Please, Sign In to add comment