16,012,107 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Justin Jones (Top 5 by date)
Justin Jones
12-Jan-13 23:09pm
View
Deleted
I tried your solution, but it doesn't work. It just displays the number regularly. here's what I tried.
private int timerTextP1;
private int dollars = timerTextP1 / 100;
private int cents = timerTextP1 % 100;
System.out.format("timerTextP1 = %d.%d", dollars, cents);
timerTextP1Pump1.setText(timerTextP1 + "");
Justin Jones
12-Jan-13 23:01pm
View
I tried your way, but it changes nothing.
private int timerTextP1;
private int dollars = timerTextP1 / 100;
private int cents = timerTextP1 % 100;
System.out.format("timerTextP1 = %d.%d", dollars, cents);
timerTextP1Pump1.setText(timerTextP1 + "");
am I doing that right? it just displays the number normal
Justin Jones
12-Jan-13 11:56am
View
only 2 digits after decimal like a US dollar amount.
25678 would be 256.78
thank you
Justin Jones
12-Jan-13 11:32am
View
I tried this
float pump1time = Math.abs(timerTextP1 / 100);
timerTextP1Pump1.setText(pump1time + "");
and it looks like its trying to work but it shows 0.0 till the count up equals 1 then it shows 1.0.
it won't show the decimal as it counts up. Weird.
Justin Jones
8-Jan-13 22:27pm
View
Thank You Torsten that helped me understand a lot!