Gripen E isn't stealth or 5th gen like F-35, both are different classes. Gripen has come a long way towards NG/E.
The J-10 in PAF service would be susceptible to undergo upgrades due to technological leaps in avionics and weapon systems. Its yet to be seen if PAF sticks to Chinese systems due to contractual agreements or gets a free hand to experiment with home grown or western systems (e.g. Italian). However, J-10C pitted against latest variants of 4.5 gen aircrafts would have been more concise. A 4.5 gen Vs a 5th gen turns into a different ball game altogether.