private Object getValue(Object item)
    {
        Object value = null;
        if(item != null)
        {
            if(item instanceof JTextField)
            {
                value = ((JTextField) item).getText();
            } else if(item instanceof JSpinner)
            {
                value = ((JSpinner) item).getValue();
            } else if(item instanceof JTextArea)
            {
                value = ((JTextArea) item).getText();
            } else if(item instanceof JCheckBox)
            {
                value = ((JCheckBox) item).isSelected();
            } else if(item instanceof JRadioButton)
            {
                value = ((JRadioButton) item).isSelected();
            } 
            if(value == null)
            {
                System.err.println("Null value! Element = " + item);
            }
        }
        return value;
    }