Create JPanel and set is LayoutManager to null
This will stop Java trying to place each componenet, then you can use the
code available to all Gui components to place the button excately where you want it and at what size you want.
-----------------
setBounds
public void setBounds(int x,
int y,
int width,
int height)
Moves and resizes this component. The new location of the top-left corner is specified by x and y, and the new size is
specified by width and height.
Parameters:
x - the new x-coordinate of this component
y - the new y-coordinate of this component
width - the new width of this component
height - the new height of this component
Since:
JDK1.1
See Also:
getBounds(), setLocation(int, int), setLocation(Point), setSize(int, int),
setSize(Dimension)
----------------------------
careful though, doing this will mean that if you resize the window, it will stay in the same place, it will not readjust like it would witha layout manager. ----------------------------------------
There are no onions, only magic
----------------------------------------