Search code examples
pythonjavawindowsframe

How do I convert the .place() method in python to java?


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?


Solution

  • There's a Swing tutorial that gives a concise example on positioning widgets absolutely.