To set the position and size of a component, which methods
are used?
Answers were Sorted based on User's Feedback
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 |
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 |
what are class,constructor and primitive data types?
What is the importance of hashcode() and equals() methods?
What is command line argument
What are the restriction imposed on a static method or a static block of code?
Is final static java?
What is javac_g?
can we create object for static class in java
14 Answers IAP Company, IBM, Marlabs, mPortal, TCS,
How many decimal places is a double?
How java is platform independent?
41 Answers College School Exams Tests, Infosys, TCS,
What is a vararg?
In what types of operations an ArithmeticException will be thrown?
What are the main uses of this keyword?