The NASM website shows some foam roller stretches:
http://www.nasm.org/ContinuingEducation/Articles/SelfMyofasciaTechniques.aspx
Tendonitis is a swelling (as are all "-itis" conditions), so if you have it, taking antiinflammatory nutrients (ginger, turmeric, mangosteen) could help (things like Ibuprofen and Advil have been coming under scrutiny lately for adverse side effects, so I would never recommend them).
You could also have what is called "patello-femoral pain syndrome" (basically a fancy way of saying "knee hurts!") which is usually caused by a tracking problem. Making sure that all muscles around the leg are stretched, as Jen suggests, and have balanced strength (for example, the hamstring should be about 70% as strong as the quad, not the same)is important.
Often, the culprit can be a weekness in the quad on the inner side of the knee (the "teardrop" muscle, vastus lateralus, I think...maybe?).
One PT exercise that is used to strengthen the muscles around the knee without stressing the knee is a straight leg extension. Sit on the floor, with your legs straight out in front of you and either lying down or propping yourself up on your forearms. Bend one leg, keeping the foot on the floor, and straighten the other, keeping it in a locked position. Now lift, hold and lower that leg under control. To hit that "teardrop" muscle more, you can turn your toes out a bit and keep the leg in that position throughout the move. Start with around 15 reps, then increase to 20, then add ankle weights in small increments (you must be able to keep the knee locked without strain).
If this is too much, you can build up to it by doing what are called "quad sets." In the same position, put a rolled-up towel under the knee (not too high) and instead of lifting the leg, just push down into the towel and straighten the leg. Hold, then release. You want to feel the quad flex as if you were going to lift the leg, without doing the lifting.