• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jspinner minimum value

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i want to set the jspinner to a min value and a max value that it can not exceed
how to do this
and also if the user entered a value in the text field next to the spinner how to check that it is valid ??
 
Ranch Hand
Posts: 410
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What did you try already? To use a JSpinner properly, you must use a SpinnerModel. It is the Spinner models that determines the range of values that can be selected. There are different implementations of SpinnerModel for different uses (SpinnerNumberModel, SpinnerDateModel, etc).

The API docs and the Java Tutorial section for JSpinner are quite useful.
 
reply
    Bookmark Topic Watch Topic
  • New Topic