Skip to content

CreateButton – Separate query from modifier refactoring technique #146

Description

@vicbguti29

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.

Screenshot from 2024-01-08 12-46-42

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!

Screenshot from 2024-01-08 12-47-35

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions