From the looks of it/only working once, it looks like you are not updating the label after clicking the button.Label text have to updated via label.setText(""); just calling the method wont do anything.
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
Course Queries 4 Answers
Course Queries 5 Answers
Course Queries 1 Answers
Course Queries 3 Answers
Course Queries 4 Answers
manpreet
Best Answer
2 years ago
I am taking Maths and I want to make a calculator which tells me the each note I need to take in the final exam to get each letter grade. In the syllabus it tells us that our note is calculated by this:
MT1 - First midterm %26.6 MT2- Second midterm %26.6 F- Final % 26.6 Q - Quizzes % 10 HW- Homeworks % 10
These are the grade intervals: A 80-100 A- 75-80 B+ 70-75 B 65-70 B- 60-65 C+ 55-60 C 50-55 C- 45-50 D+ 40-45 D+ 30-40 F 0-30
You enter MT1, MT2, Q, HW in the JTextFields and when you click the button it will update the jlabel's near the letter grades. When I run the code for the first time, it works but when I want to change it program doesn't update the numbers. Could you help?
Final_Calculator:
Grades: