Resize frame automatically.