The chances of fracture or soft tissue injury
might be there which is causing such pain and swelling at the local area.
You should have the x-ray of the knee joint done to rule out any fracture.Meanwhile you may apply the analgesic ointments
on the site and take NSAID like motrin, advil to control the pain and swelling.
The fracture is any needs to be fixed and immobilsed after consulting an orthopaedician.