Which method of the Component class is used to set the position andsize of a component

SetBounds()

Showing Answers 1 - 10 of 10 Answers

tulasi

  • Sep 7th, 2005
 

setSize(x,y)

  Was this answer useful?  Yes

satheesh

  • Oct 1st, 2005
 

first of all set the Layout to null then apply setBounds();setLayout(null); Component.setLayout(x, y, width,height);

  Was this answer useful?  Yes

kanniappan

  • Oct 2nd, 2005
 

setBounds(int x, int y, ing width, int height):

        It is a method of a component to location and size a component.  But it will work only when the container doesn't have any one of default managers. 

        If a component already has any one of default layouts then the size and location of the component is desided by the layout manager.             

  Was this answer useful?  Yes

abc

  • Feb 1st, 2017
 

setPosition()

  Was this answer useful?  Yes

Krushna malthankar

  • Jan 20th, 2019
 

"SetBounds()" method is used to set position and size of components..

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions