Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSlider with decimal point increments

 
Jody Monahan
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I was just wondering if it is possible to set a JSlider with a minimum of '0' and a max of '1' with increments of lets say '0.1'?

I have obviously tried the following code, however it displays only one label - '0' and only one tick, also at '0'.

Any help would be greatly appreciated.

 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
not sure if there's any new inbuilt way to do it, but here's the old way

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic