Heloo;
when i drag the window; then how i stop changing the size of textfield and buttons, and how i fixed the size of window.i shall be very thankful to all of you kindly give me the answer...

Heloooo...

If I get what you're saying, you mean that you can still drag the window and resize it when the program running and you don't want that?

Just go:

yourJFrame.setResizeable(false);

you u got it right thnx; but i have another problem too i.e i want to add new line after the second text field; let say i have made one text field and for the second text field i want that it will come in the next row, now how i displayed it in the second row

Do you want the second text field to appear only when needed?
An easy way is to create it when you build the window at the start, but make it invisible (setVisible(false)). Then when you want it to appear make it visible and pack() your window again.