public static Object getValue(Component component) {
    if (component instanceof CellEditorComponentWithBrowseButton) {
      final JTextField textField = (JTextField)((CellEditorComponentWithBrowseButton<?>)component).getChildComponent();
      return textField.getText();
    }
    else if (component instanceof JTextField) {
      return ((JTextField)component).getText();
    }
    else if (component instanceof JComboBox) {
      return ((JComboBox<?>)component).getSelectedItem();
    }
    else if (component instanceof JCheckBox) {
      return Boolean.valueOf(((JCheckBox)component).isSelected());
    }
    throw new UnsupportedOperationException("editor control of type " + component.getClass().getName() + " is not supported");
  }
public static Object getValue(Component component)