• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSlider with default point

 
mallikarjun dontamsetti
Ranch Hand
Posts: 246
Firefox Browser Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a doubt about JSlider . in my case i want a the pointer should points to middle( present value) user can drag to right or left if user drag it to left the value should minus the points he dragged and with right drag opsit to that action. is it possible
FYI
when user drag and leave the pointer it should come back to default position.
 
Darryl Burke
Bartender
Posts: 5125
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exactly are you stuck on?

Do you know how to construct and display a JSlider in your GUI?
Do you know how to make a slider that is initially set to the middle of its range?
Do you know how to query the value of a slider?
Do you know how to set the value of a slider in code?
Do you know how to listen for changes in a slider's value?

The answers to these can be found in the tutorial linked from the API for JSlider. Give it your best shot and see if you run into any problems. You shouldn't, but if you do, post your attempt in the form of an SSCCE <-- link and ask a specific question.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic