A few possibilities
Depending on how your surgeon performed your replacement, several issues can cause anterior, kneecap pain.
If your patella was left 'as is', and not resurfaced with plastic, it can still be a source of pain post surgery. If a plastic component was fixed to your patella, too thick a combination can result in pain. In either case, a knee whichdoesn't fully straighten can give you pain with walking.