Which method of the component class is used to set the position and the size of a component?

setBounds(). The following code snippet explains this:
txtName.setBounds(x,y,width,height);
places upper left corner of the text field txtName at point (x,y) with the width and height of the text field set as width and height.
 

Search Topics

Popular Posts