In my java program, when the user clicks on a button in the main JFrame another JFrame becomes visible on top of the main frame. Now how to make the previous frame blurred? 
Exactly like the background in the image :

In my java program, when the user clicks on a button in the main JFrame another JFrame becomes visible on top of the main frame. Now how to make the previous frame blurred? 
Exactly like the background in the image :

 
    
    Now how to make the previous frame blurred?
have look at JLayer(Java7) based on JXLayer(Java6),
similair effect is possible with GlassPane, or with JViewport (not proper of ways, but good Swing GUI contains JScrollPane as 1st. JComponent in JFrame / JDialog / JWindow)
I'm assuming that you are coding using Java Swing, and the picture is the effect you want.
You would use a JDialog to create the top window, rather than a JFrame.  A JDialog is designed to be modal.  In other words, lock the JFrame until the JDialog is closed. 
The default behavior of a JDialog is to not blur or darken the underlying JFrame.  In order to darken the underlying JFrame, you're going to have to paint a black image on the glass pane of the JFrame.
This tutorial shows you how to manipulate the root panes of a JFrame.
 
    
    There is the setOpacity(float opacity) method that is available in JFrame (inherited from Frame actually).
