In .net there is a control called anchoring that is used to resize controls dynamically with the form. When a control is anchored to a form and the form is resized, the control maintains the distance between the control and the anchor positions.
My question is that is there any controls in java that does same functionality as anchoring in .net.
As for an example i have selected a textfield and put it on the panel and resized it properly.
Now when i change the size of window(JFrame) or maximize the window the textfield will not maintain the same distance as it was previously.
I have been using netbeans and i havent found any properties in pallete manager that answers my question.
Please explain me with an example or some links.