Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Swing / AWT / SWT
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Swing / AWT / SWT
Assigning floats to JLabels
Dave Johnson
Ranch Hand
Posts: 111
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
If you have a JLabel that you wish to use for displaying the results of a calculation of two floats, what methods() are use for this?
Thanks, Dave.
Jose Botella
Ranch Hand
Posts: 2120
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
This is a job for
java.text.NumberFormat
or maybe
java.text.DecimalFormat
SCJP2. Please Indent your code using UBB Code
Dave Johnson
Ranch Hand
Posts: 111
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks Jose.
The code I used was this:
l[i].setText(""+tally[i]);
The I tried earlier was
l[i].setText(+tally[i]);
and obviously that was no good.
Anyway I'll read the stuff you suggested and thanks again mate.
Consider Paul's
rocket mass heater
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Caculating Compounded interest without double values
printf, multiple flags
Comparing Floats
conversion Doubt
Arrays
More...