0

i was writing a code for the applet in the awt class.

but i was confused as i couldnt find any function to fix the position of button or textbox in the applet.
the only solution which i got was using layout manager.

but then i also couldnt find the function to fix the size of the button.

even the setSize() and setLocation() functions were not working.

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by BestJewSinceJC
0

If you wish to be ale to fix the size and location of a component (irrespective of the users screen size, resolution etc), you will need to set your layout to "null" (not recommended) and then set the co-ordinates for each component manually.

But then this could handicap your users who may not be using the optimum resolution and screen size for which you designed your GUI.

Look here and here for more information on absolute positioning of components using null layout.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.