I'd say the error is the result of trying to set the panel as a parent for an object that cannot have a panel as a parent. Knowing what type of object is causing your error should help figure out exactly what the problem is and how to avoid it.
Do you know what type of object uimenu is? If the result panel only needs the labels and images, you should be able to pull those out of the list of children and only copy them. I believe all of the ui objects can be differentiated by either their 'Style' or 'Type' properties.
Maybe something like:
childObjects = get(hf,'Children');
types = get(childObjects,'Type');
uicontrolIndecies = strcmp(types,'uicontrol');
uicontrols = childObject(uicontrolIndecies);
Although you may need to manipulate the output from the get function before using strcmp...
perhaps an easier approach:
uicontrols = findall(hf,'Type','uicontrol','Parent',hf);
If you have changed MATLAB versions since you first wrote the code, the java implementation of some of the ui objects you used may have changed, causing your error.