I'm unaware of a "standard" XY-layout manager in Java, though in the past some IDE vendors have created custom layout managers that used a fixed X- and Y-coordinate placement (eg., Borland's JBuilder 8 has an XYLayout class). The GridBadLayout manager might be contorted to provide this, provided you put everything into the same grid and used GridBagConstraints to provide X- and Y-offsets. I haven't tried it, but it might work. Actually it's not that hard to create a custom layout, and making an XY-layout manager is a good little exercise.
posted 16 years ago
all I know is I saw his code and it went like this: buttonName.someFunction(x,y); then I think he added it like normal
Current student at ITT Tech, Seattle<br />-----------------------------------------<br />6th Quarter | Software Application and Programming
Hi Jeremy, Although it's not recommended, here's what you do: you call setLayout(null) on the container so there's no layout manager at all, add the component, and then call setBounds() to set the component's width, height, and coordinates. This isn't recommended because it's not portable; a GUI built this way may look fine on one machine but lousy on another, due to differences in screen resolution, window dimensions, etc.