I am creating a Java desktop application where the user will enter his name and age and press next, like given below in image 1.

And the action would perform would be like given in the image below in image 2.

I went through all tutorials on the Netbeans site, but still I was not able find any solution. I want to build this application like what we see when we install some application on Windows, we select some option and press next and a new window will appear with the result or more options. Please somebody help me with step by step instruction.
I don’t think you’ll get as much out of “step by step” instructions as you will going through the tutorials and learning not only how to do what you’re desire, but the whys and hows of what you’re doing. That being said, you will want to go through several of the Java Swing tutorials to learn how to do this including
Much of learning to code means independent study and much trial and error. So start experimenting and have fun doing so!