Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / January 2007

Tip: Looking for answers? Try searching our database.

resetting a JSpinner

Thread view: 
steve - 08 Jan 2007 09:19 GMT
Hi,

never had to do this before until today.......

A jspinner which spins between page 1 & n of a document.

once my jspiner is on the screen and i want to display another document with
more or less pages than my last , how do i re-set my  jspinner "upper" limit
to the new value.

steve
Fred Kleinschmidt - 08 Jan 2007 20:02 GMT
> Hi,
>
[quoted text clipped - 7 lines]
> limit
> to the new value.

Presumably you are using a SpinnerNumberModel. Use its setMaximum()
method.

For example:
   SpinnerNumberModel m = (SpinnerNumberModel)spinner.getModel();
   m.setMaximum( new Integer(newmax) );
Signature

Fred L. Kleinschmidt
Boeing Associate Technical Fellow
Technical Architect, Software Reuse Project



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.