The whole idea of a layout manager is that you don't enter the x, y coordinates of a component in a container. that is called "absolute positioning" or the "null layout."
Find any decent book and read about layout managers (eg C Horstmann, G Cornell, Core
Java 2 vol 1: fundamentals, Santa Clara: Sun Microsystems Press (Prentice-Hall) (2004), page 345ff, 424ff). The advantages of a manager over null positioning, according to Horstmann and Cornell are:-
It is easier to alter the size of components to match their contents.Components do not "fall off" the edge of the container when it is resized."If you insist on using absolute positioning, try:-
. . . or similar.
I would suggest you read Horstmann, understand their GBC class (see page 433 or
here, and use GridBag. But it is the most awkward manager to learn.