Critical Behavior and Scaling in Trapped Systems