> How can i put empty space between the border of my JFrame and the objects i
> put on the screen? I'm using a GridLayout with 3 rows and 1 column, the
> problem is that my screen i completly filled with the elements; How can i
> tell the GridLayout or the frame that i need an empty space between the
> gridlayout and the frame?
Apply the Gridlayout to a JComponent, add that to the frame and do:
myJComponent.setBorder(BorderFactory.createEmptyBorder(10,10,10,10)); // or
similar

Signature
Mike W
VisionSet - 19 Dec 2003 15:15 GMT
> > How can i put empty space between the border of my JFrame and the objects
> i
[quoted text clipped - 6 lines]
> myJComponent.setBorder(BorderFactory.createEmptyBorder(10,10,10,10)); // or
> similar
or if you don't mind space between your 3 grid cells as well then just do
new GridLayout(3,0,10,10); where 10,10 is the space between cells in x & y

Signature
Mike W
Andrew Thompson - 19 Dec 2003 18:17 GMT
...
> new GridLayout(3,0,10,10); where 10,10 is the space between cells in x & y
teh! (rolls eyes)
Well for pity's sake Mike, I thought my
answer was entirely adequate. Before
_you're_ done you'll have written a SSCE
with buttons to adjust the border size!
Leave some work for the _OP_ ;-)
VisionSet - 19 Dec 2003 18:40 GMT
> ...
> > new GridLayout(3,0,10,10); where 10,10 is the space between cells in x & y
[quoted text clipped - 7 lines]
>
> Leave some work for the _OP_ ;-)
I try and look at this forum as, rather selfishly, a learning experience for
me.
If someone asks and I think I can answer i shall in as full a manner as I am
able and my time allows, or I can be bothered to muster. If it is wrong I
shall learn more than posting myself, because people seem more willing to
'set you right' than 'help you out' ;-)
But that is usenet in general, certainly a more helpful and down right nice
bunch you couldn't hope to come across than on c.l.j.* :-)

Signature
Mike W
> How can i put empty space between the border of my JFrame and the objects i
> put on the screen?
javax.swing.border.EmptyBorder
--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site