doublemetal 2013. 7. 17. 00:56


class FlowLayoutTest extends Frame {

public FlowLayoutTest(String str) {

super(str);


FlowLayout fl = new FlowLayout();

Button btn[] = new Button[10];


setLayout(fl);

for (int i = 0; i < 10; i++) {

btn[i] = new Button((i + 1) + "번 버튼");

add(btn[i]);

}

setBounds(100, 100, 200, 200);

setVisible(true);

}

}


public class FlowLayoutMain {


public static void main(String[] args) {

// TODO Auto-generated method stub

new FlowLayoutTest("Flow Layout Test");

}

}