I am trying to convert my Python Code to Java. I need a GUI that is similar to python where I can use widgetname.place(x,y)
to place objects anywhere I want in the window. I want to be able to specify where the object is placed in the window. I have tried GridLayout
, GridBagLayout
, BoxLayout
and FlowLayout
. None of those are allowing me to secify x and y coordinates to place my objects(text fields, labels, buttons) where ever I want. I need to be able to specify where the object goes on the screen using x and y coordinates.
Anyone have any ideas?
This can be done setting your LayoutManager
to null
, but it's highly discouraged precisely because it annihilates the goal of layouts, which is to be able to have good-looking frames, regardless of the look and feel, screen resolution, etc.
You'd better learn how to use layout managers, because that's the good way to design a GUI.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With