I had problems with my knees after I gained a heap of muscle and then levelled out on my weight and stopped squatting for a while. My knees were now sore all the time.
At some point I read an article called "Everything you know about fitness is a lie" (which has been posted to HN several times), which has a section entitled, "You're only as strong as your weakest muscle". It talks about strengthening stabiliser muscles and exercises to rehabilitate weakened muscles.
The section also illustrates some of the better exercises you can do to alleviate injuries. In particular, there is an exercise for strengthening the knees - I can only describe as a straight leg lift while lying on one's side - which I tried for a couple of weeks, despite the flak I copped from my weightlifting compatriots.
I believe it works the quadriceps, and from my research, the exercise alleviates the difference in strength between the hamstring and the quadricep (don't quote me on this though), which seems to be the cause of my particular joint problem.
However, I've found I can't just go up to a certain point and stop the exercise. I need to continue with it as long as I'm doing squats. It's annoying, because none of my weightlifting crew have this problem, so I think it's got to do with the particulars of my genetics, but whatever works.