To set the position and size of a component, which methods
are used?

Answers were Sorted based on User's Feedback



To set the position and size of a component, which methods are used?..

Answer / ranjith

setBounds

Set the size and location relative to the parent's upper
left corner, in pixels, of the component. The four int
arguments specify x, y, width, and height, in that order.
Use these methods to position and size a component when you
are not using a layout manager.

Is This Answer Correct ?    8 Yes 1 No

To set the position and size of a component, which methods are used?..

Answer / ravikiran

setBounds

Is This Answer Correct ?    8 Yes 3 No

To set the position and size of a component, which methods are used?..

Answer / pkr_reddy

to set the position is used setLayout accepting the argument
as layout object.

ex:setLayout(layout lobject);

in order to set the component sze there is no method that is
default set the size by layout manazer .

Is This Answer Correct ?    5 Yes 4 No

Post New Answer

More Core Java Interview Questions

Which object oriented concept is achieved by using overloading and overriding?

0 Answers  


What is void class in java?

0 Answers  


Can we modify the throws clause of the superclass method while overriding it in the subclass?

0 Answers  


Name few "optional" classes introduced with java 8 ?

0 Answers  


when there is a need of jvm then how we can say that java is a platform independent language?

3 Answers  






what is translator and it types

1 Answers  


Is null a string?

0 Answers  


What is final access modifier in java?

0 Answers  


What are the java ide’s?

0 Answers  


How do you replace all in word?

0 Answers  


What is a generic data type?

0 Answers  


Can I have constructor in Interface?

2 Answers  


Categories