Hi, I am trying to make a Java Applet and using gridlayout
Here's the code:
setLayout(new GridLayout(2,2));
ButtonA = new Button("A");
ButtonB = new Button("B");
ButtonC = new Button("C");
ButtonD = new Button("D");
add(ButtonA,"1");
add(ButtonB,"2");
add(ButtonC,"3");
add(ButtonD,"4");
Unfortunately, this code makes all the buttons stretch towards the whole screen that's 400x400, what if i want to make it in the middle that's 200x200 on a 400x400 applet.
Thanks