@Override
    public void mouseExited(MouseEvent e) {
        JPanel selectedPanel = (JPanel) e.getSource();
        
        Color x = selectedPanel.getBackground();
        if (x.equals(new Color(50,50,50))) {
            selectedPanel.setBackground(Color.WHITE);
        } else {
            selectedPanel.setBackground(x);
        }
    }