About GridLayout.
Posted
by Knowing me knowing you
on Stack Overflow
See other posts from Stack Overflow
or by Knowing me knowing you
Published on 2010-05-12T10:06:46Z
Indexed on
2010/05/12
10:14 UTC
Read the original article
Hit count: 240
Hi, if I have code like so:
class X extends JFrame
{
X()
{
setLayout(new GridLayout(3,3));
JButton b = new JButton("A-ha");
/*I would like to add this button in the center of this grid (2,2)*/
//How can I do it?
}
};
Thanks.
© Stack Overflow or respective owner