private Object iceMethodCall(String methodName, Object[] args) {
    // Figure the Class of each element of args[]:
    Class[] parameterTypes = new Class[args.length];
    for (int i = 0; i < args.length; i++) {
      parameterTypes[i] = args[i].getClass();
    }
    try {
      Method method = iceClass.getMethod(methodName, parameterTypes);
      return (method.invoke(iceBrowser, args));
    }
    catch (NoSuchMethodException e) {
      JOptionPane.showMessageDialog(null,
          "No such method in ice.iblite.Browser: " + methodName, "Warning",
          JOptionPane.WARNING_MESSAGE);
    }
    catch (InvocationTargetException e) {
      JOptionPane.showMessageDialog(null,
          "InvocationTargetException in call to: " + methodName, "Warning",
          JOptionPane.WARNING_MESSAGE);
    }
    catch (IllegalAccessException e) {
      JOptionPane.showMessageDialog(null, "IllegalAccessException in call to: "
          + methodName, "Warning", JOptionPane.WARNING_MESSAGE);
    }
    return null;
  }