@Override
    public void actionPerformed(ActionEvent event) {
        Object source = event.getSource();
        
        if(source == btnBack) {
            Globals.mainFrame.getContentPane().remove(Globals.mainFrame.panelC);
            Globals.mainFrame.getContentPane().add(Globals.mainFrame.panelB);			        
        }
        
        for(int i = 0; i < btnDigits.length; i++) {
            if(source == btnDigits[i]) {
                if((i != 0 || lblResultVal.getText().length() != 0) && lblResultVal.getText().length() <= 7) {
                    lblResultVal.setText(lblResultVal.getText() + Integer.toString(i));
                }
            }
        }
        
        if(source == btnClear) {
            lblResultVal.setText("");
        }
        
        Globals.mainFrame.invalidate();
        Globals.mainFrame.validate();
        Globals.mainFrame.repaint();
    }