I am writing an application for a Java course. I am a complete beginner and am just going off material I have learned from the course and from the web. The application is exhibiting some behavior and I am not sure what is causing it. The application is GUI based and does calculations on user input. For the action listener section, I have a set of If statements such as: "if this button do this if this button do this"
All in a row like that. It seems as if the application is running ALL the if statements instead of running the one that corresponds with the button pressed.
Would I be better off using a case/switch structure for this sort of thing?
I can post my code if necessary, I am new around this site and am not sure if that thing is acceptable.