Following any injury to the knee, but especially one in which the knee has swelled up, the quadriceps muscles are inhibited and they rapidly diminish in bulk. This diminution of size and power can occur very rapidly and if the quadriceps become weak beyond a certain point then the knee may begin to feel unstable and pain may be felt around and behind the kneecap. Quadriceps weakness may also occur due to chronic disease that cause pain such as osteoarthritis affecting the patello-femoral joint.
The treatment for this is hard work with your physiotherapist who will show you the best exercises to build muscle. Unfortunately, although quadriceps wasting can occur in days, it can take weeks to rebuild the strength in this muscle group as overdoing the exercises initially may lead to more pain and further inhibition.