public Object getSelectedTool(){
        btns = new ArrayList();
        btns = Collections.list(btnGroup.getElements());
        
        for (int i = 0; i < tools.size(); i++){
            JToggleButton button = (JToggleButton)btns.get(i);
            if (button.isSelected()) return tools.get(i);
        }
        return null;
   }