aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JSlider with decimal point increments Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JSlider with decimal point increments" Watch "JSlider with decimal point increments" New topic
Author

JSlider with decimal point increments

Jody Monahan
Greenhorn

Joined: Feb 10, 2010
Posts: 20
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

Joined: Jun 09, 2003
Posts: 4632
not sure if there's any new inbuilt way to do it, but here's the old way

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: JSlider with decimal point increments