It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Partner Sites
Board index Programming Java Forum

Buttons with loop

Buttons with loop

Postby var5an1 on Mon Jan 02, 2006 8:03 pm

double total;
amount = Double.parseDouble(message.getText());
if (e.getSource()== tenP)
{
do
{
total = amount - 0.10;
}
while (total ==0);
message.setText(""+total);
total--;
}

Nearly works, but when it gets to 0.8 is give another long interger, not decrements by 10 after 0.8, i.e 0.7

Please help..dont know y it does that
var5an1
 
Posts: 3
Joined: Sun Jan 01, 2006 10:43 pm

Return to Java Forum

Who is online

Users browsing this forum: No registered users and 0 guests