public GUI() {
        setTitle("Calculator");
        setSize(WIDTH, HEIGHT);
        setLocationRelativeTo(null); // Center the GUI
        setResizable(false);
        setDefaultCloseOperation(EXIT_ON_CLOSE);

        ImageIcon icon = new ImageIcon(this.getClass().getResource("/icon.png"));
        this.setIconImage(icon.getImage());

        JPanel panel = new JPanel();
        panel.setLayout(new GroupLayout(panel));
        add(panel);

        output = new JTextField("0");
        output.setBounds(PADDING, PADDING, WIDTH - PADDING * 2 - FRAME_PADDING, 40);
        output.setFont(new Font(Font.DIALOG_INPUT, Font.PLAIN, 20));
        output.setHorizontalAlignment(JTextField.RIGHT);
        output.setCaretPosition(output.getText().length());
        output.addKeyListener(new KeyHandler());
        panel.add(output);

        solver = new Solver(this);

        addButtonSet(panel, functionButtons, 2, PADDING);
        addButtonSet(panel, numberButtons, 3, CENTER_PADDING_X);
        addButtonSet(panel, operatorButtons, 2, RIGHT_PADDING_X);
    }