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...

Recommended Answers

All 4 Replies

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.