tommy408
17 Aug 2009, 7:08 AM
How can I layout the component horiztonatally and let it flow to next line vertically?
In the code below, the button2 keeps going below button1.
LayoutContainer layoutCon = new LayoutContainer();
layoutCon.setLayout(new FlowLayout());
Button button1 = new Button();
button1.setSize("32px", "32px");
layoutCon.add(button1,new FlowData(5));
Button button2 = new Button();
button2.setSize("32px", "32px");
layoutCon.add(button2,new FlowData(5));
In the code below, the button2 keeps going below button1.
LayoutContainer layoutCon = new LayoutContainer();
layoutCon.setLayout(new FlowLayout());
Button button1 = new Button();
button1.setSize("32px", "32px");
layoutCon.add(button1,new FlowData(5));
Button button2 = new Button();
button2.setSize("32px", "32px");
layoutCon.add(button2,new FlowData(5));