if(type.equals("JTextField"))
cc.comp = new JTextField(prefMap.get(name));
else if(type.equals("JPasswordField"))
cc.comp = new JPasswordField(prefMap.get(name));
else if(type.equals("NumericTextField"))
cc.comp = new NumericTextField(prefMap.get(name));
cc.comp.setName(name);
}