I told you in this tutorial about how to make RPM package.
Also I told you how to use Netbeans IDE.
Today I will show how to make this settings.
First you will need make the application working well.
Then you need to go on to project and press click right with your mouse.
Set your package like in the next image:
Now you can build your RPM package for your distro , see the next image: