User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » Java JSlider question Page [1]  
Novicane
All American
15413 Posts
user info
edit post

My JSlider value controls my timer.


speedSlider = new JSlider();
speedSlider.setMinimum(200);
speedSlider.setMaximum(1000);
speedSlider.addChangeListener(this);
speedSlider.setValue(1000);


But the problem, my slider is reversed. The user has to slide it to the left to speed the program up.

I want the minimum to be 1000 (slowest) and 200 to be the fastest since it is controling my intervals of my timer.

2/28/2006 4:44:41 PM

ZeroDegrez
All American
3897 Posts
user info
edit post

just change the way you give the numbers to the user. Let it go from 2-10. Then use that number to divide 2000. so that at the left side the slow, and the high is the fast.

2/28/2006 4:50:49 PM

 Message Boards » Tech Talk » Java JSlider question Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.38 - our disclaimer.