Also, keep in mind that you can play around with increasing and decreasing the amount of knee extension, by varying the amount your ankle flexes. Sometimes if I feel pain start to develop in the front of one knee, I can start letting my heel drop at the bottom of the pedal stroke, which allows the knee to fully extend, reducing the amount of stress to the front of that knee. A lot of times just doing this for a few pedal strokes helps reduce knee pain considerably.