I assume, you are using GXT. ContentPanel, FitLayout, EditorGrid are classes which come with Sencha GXT, I think version 2.x. Check if you have import which starts with "com.extjs".
You have a problem with your layout chain. Are you using a FlowLayout in one of the parent panels?
Have you tried to call forceLayout() or
panel.getLayout().layout();
after adding the new Grid?