Pain in your kneecap may be due to an outer thigh muscle (vastus lateralis) that is pulling your kneecap to the outer side of your leg with greater force than your weaker vastus medialis oblique (VMO) can oppose. This causes your kneecap to track off center, which grates cartilage and bone. To prevent this problem, strengthen the inner thigh muscle with partial knee extensions. Strap a 5-pound weight to one ankle. Then, sit on a chair, and bend your knees 90 degrees. Lift your weighted ankle until the calf is parallel to the floor. Then, lower it halfway (45 degrees). Lift it back to parallel. Do three sets of 15 (going from 45 degrees to straight) with each leg.