Hi, I noticed that there exists createButton() method in Calculator.java that returns a JButton, but it also updates the window when adding the button that is returned.

One path to take might be to split the method into two: getButton() and make use of the add() method outside the method. Only as a refactoring technique practice. Have a nice day!

Hi, I noticed that there exists createButton() method in Calculator.java that returns a JButton, but it also updates the window when adding the button that is returned.
One path to take might be to split the method into two: getButton() and make use of the add() method outside the method. Only as a refactoring technique practice. Have a nice day!