Solved

JScrollBar Question

Posted on 2006-11-21
5
215 Views
Last Modified: 2010-03-31
Hello,

I have a requirement in my SW development to create a scrollbar that has a min = 0.00, max = 100.00 and increments must be
floating point values with 2 decimal places. Currently ion javadocs I see scrollbars that work only for intergers. Do anyone know
where I can find this or can anyone throw some light to create one like that?

-prain
0
Comment
Question by:prain
  • 3
  • 2
5 Comments
 
LVL 12

Expert Comment

by:enachemc
ID: 17987119
can't you make your scorll bar work in ranges 0-10 000 and instead of increase with two decimal digitis ... increase with this multiplied by 100 ? This results only in integers being used.
0
 

Author Comment

by:prain
ID: 18029038
No I cannot do that. This situation is different, and the user MUST see the incremented value in 2 decimal places.
That's our requirement. The Max MUST be 100.00  (a floating point) and the min MUST be (0.00).  Increments or
decrements MUST be in two decimal places. That's the requirement we have.
0
 
LVL 12

Accepted Solution

by:
enachemc earned 125 total points
ID: 18029055
how will the user know what values the scrollbar uses ? you can do the transformations required. Display a 30,12 and use a 3012 value.
0
 

Author Comment

by:prain
ID: 18033283
Ok. I think I get your point. Let me try this out and get back with you. Nice insight.
0
 

Author Comment

by:prain
ID: 18050168
Thanks. Works Well.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now