Is there a way to change the order of the elements created in the Row layout, I want to display it in the elements, like the first in the first display. For example, if I create element1, then element2 element3, element4
I want to see the layout as element4 element3 element2 element1
which means that the elements to be created will be the first element to be displayed in the shell.
Is there an easy way to work with a line layout and do it.
I want to change the following example to display Button99 Button98 Button97 Button96 Button95 Button95 Button94 .....................................
import org.eclipse.swt.SWT; import org.eclipse.swt.layout.RowLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; public class TestExample { public static void main(String[] args) { Display display = Display.getDefault(); Shell shell = new Shell(display); RowLayout rowLayout = new RowLayout(); shell.setLayout(rowLayout); for (int i=0;i<100;i++) { Button b1 = new Button(shell, SWT.PUSH); b1.setText("Button"+i); } shell.open(); while (!display.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } } }
Thanks at Advance.
source share