Please help
I am brand new to java
I need help creating the java code so that when I click a button it will add .01 to a running total. I have tried to modify a calculator code but it did not work. Any help at all. Thank you

Recommended Answers

I suggest you start by writing a hello world console application rather than modifying some code you don't understand

Jump to Post

All 5 Replies

I suggest you start by writing a hello world console application rather than modifying some code you don't understand

What is a Hello world Console

double runningTotal = 0.0;
...

public void actionPerformed(ActionEvent e) {
  Object o = e.getSource();
  if(o == buttonIcheck) {
    ...
    runningTotal += 0.01;
    ...
  }
}

Thank you Pbl but how do you make it work??

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.