function meshmodel(event)

frame=event;

fem=getdata(frame);

meshsize=frame.get('meshsize').getSelectedIndex;

fem.mesh=meshinit(fem,'hauto',2+meshsize);

if isfield(fem,'xmesh')
  fem=rmfield(fem,'xmesh');
end

storedata(frame,fem);

parent=frame.get('axis').getHandle;
cla(parent);
meshplot(fem,'parent',parent);
