To set the position and size of a component, which methods
are used?
Answer Posted / 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 |
Post New Answer View All Answers
Name and explain the types of ways which are used to pass arguments in any function in java.
Difference between process and thread?
What is == in java?
How do you join strings in java?
What is nullpointerexception?
What is the maximum size of hashmap in java?
What do you understand by abstract classes?
What is nextint java?
What are the differences between string, stringbuffer and stringbuilder?
Which is faster call by value or call by reference?
I want to persist data of objects for later use. What’s the best approach to do so?
Can we override constructors?
Java is Pass by Value or Pass by Reference?
What is the exception hierarchy in java?
How do you declare an array in java?