The planning of the Almighty Allah is better for you than your own planning,
and He could deprive you from what you ask to test your patience.
So Let Him see from you a determined patience and you will soon see from Him what will give you joy.
And when you have cleaned the paths of answering (of supplication) from the stains of sin (i.e have repented)
and were patient about what He has chosen for you,
then everything that happens to you is better for you,
whether you were given or deprived of what you have requested :-)