Click here to Skip to main content
15,895,011 members

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!