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 / GUI / June 2004

Tip: Looking for answers? Try searching our database.

Click versus Drag to move JSlider

Thread view: 
Jim Moon - 11 Jun 2004 17:21 GMT
How do you make it so a JSlider can be moved by clicking where you want it
to be?

The default behavior seems to only allow dragging it.

I've downloaded the demo's from
http://java.sun.com/docs/books/tutorial/uiswing/components/slider.html#labels
and the JSliders are moveable by clicking.

But when I create one, it doesn't seem to be clickable.

Thanks in advance for any feedback or guidance!

Jim
VisionSet - 11 Jun 2004 19:14 GMT
> How do you make it so a JSlider can be moved by clicking where you want it
> to be?
>
> The default behavior seems to only allow dragging it.
>
> I've downloaded the demo's from

http://java.sun.com/docs/books/tutorial/uiswing/components/slider.html#labels
> and the JSliders are moveable by clicking.
>
[quoted text clipped - 3 lines]
>
> Jim

Do you by any chance have a massive range eg minVal = 0 maxVal > 500

The bigger the range the smaller the pointer movement when you click the
track.  Try a tiny range to compare.

You can may be able to use a smaller range and convert this to the model
data you require.

--
Mike W
Jim Moon - 11 Jun 2004 20:10 GMT
Thank you, Mike!

The JSlider does work better with proportionately smaller ranges.

Jim
Will Hartung - 14 Jun 2004 22:21 GMT
> Thank you, Mike!
>
> The JSlider does work better with proportionately smaller ranges.

The key seems that the click to the right or left of the slide means "up" or
"down" rather than "go to here".

Otherwise, the resolution wouldn't matter.

Regards,

Will Hartung
(willh@msoft.com)


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.