Hie guys can I please have some help if you will.

I have a GUI program that is working well. Now I want to take a payment button to make a dialogue box to pop up, the user will then enter an amount into a text field and press pay on the same dialogue box.

My question is really simple.

I want to add a dialogue box in netbeans. I can see the button on the right swing windows panel. But my question is how do I actually put it. I mean I can't just drop it on the main GUI since I only want it to pop up when someone clicks something on the main GUI. Again how will I be able to edit it and add textFields and the like. I hope someone who uses netbeans understands my perplexity