private String getSelectedButtonName(ButtonGroup bg) {
        
        String returnString = "";
        
        boolean isFound = false;
        
        Enumeration<AbstractButton> blockButtons = bg.getElements();
        
        while(blockButtons.hasMoreElements() && !isFound) {
            JToggleButton button = (JToggleButton) blockButtons.nextElement();
            
            if(button.isSelected()) {
                returnString = button.getName();
                isFound = true;
            }
        }
        
        return returnString;
    }