public HashMap<String, Object> getForm(){
        form = new HashMap<String, Object>();
        Component[] fields = getComponents();
        for(Component field: getComponents()){
            if (field.getClass().getSimpleName().equalsIgnoreCase("JTextField")) {
                JTextField f = (JTextField) field;
                form.put(f.getName(), f.getText().trim());
            }
            else if (field.getClass().getSimpleName().equalsIgnoreCase("JCheckBox")) {
                JCheckBox f = (JCheckBox) field;
                form.put(f.getName(), f.isSelected()?1:0);
            }
            else if (field.getClass().getSimpleName().equalsIgnoreCase("JComboBox")) {
                JComboBox f = (JComboBox) field;
                Item item = (Item) f.getSelectedItem();
                form.put(f.getName(), item!=null? item.getCode(): "");
            }
            else if (field.getClass().getSimpleName().equalsIgnoreCase("JRadioButton")) {
                JRadioButton f = (JRadioButton) field;

            }
        }
        return form;
    }