How to center align all elements inside a jframe to center in java?

Shammikit

Honorable
Nov 30, 2013
35
0
10,580
Im making a ATM enter PIN screen using java.i have written the code to make it appear full screen when i run it but all the other elements such as the jtextfield,labels and buttons are still at the top left corner of the screen.How can i get them all to the center of my screen? .