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


Please Help Members By Posting Answers For Below Questions

What is final keyword?

741


Write a program to search a number in the given list of numbers.

720


Give us a program to check for parenthesis matching using stack.

639


What is string pool?

719


Which class cannot be a subclass in java?

625






Can an object subclass another object?

645


State the merge-sort principle and its time complexity.

646


What is the method to declare member of a class static?

636


Explain when classnotfoundexception will be raised ?

652


what is optional in java 8?

676


What is the difference between private & public & friendly classes?

647


What does this mean java?

669


What is meant by interface?

638


What is a variable and constant?

655


What is join () in java?

617