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

What is formatted output in java?

0 Answers  


What is the use of hashmap in java?

0 Answers  


What is Java Reflection API? Why it’s so important to have?

0 Answers  


Difference between abtsract & final

1 Answers   Nous,


What is lambda expression in java?

0 Answers  






what is multitherading

3 Answers   Tech Mahindra,


What is merge sort in java?

0 Answers  


How do I print a “?

0 Answers  


Which method cannot be overridden in java?

0 Answers  


Why do we need wrapper class?

0 Answers  


Why null value is used in string?

0 Answers  


What is the difference between compile-time polymorphism and runtime polymorphism?

0 Answers  


Categories