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...
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?
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.
Okay so what you saying is that you basicly want to display another textField underneath another one? You can look up into all the Layout managers that Java offers.http://download.oracle.com/javase/tutorial/uiswing/layout/visual.html
What LayoutManager you currently using on your GUI?