Tenho uma tela de cadastro sempre que adiciono alguns itens estes devem aparecer em uma tabela.
Fiz o layout utilizando o grid layout, mas a parte superior precisa ser maior que a inferior, então gostaria de saber se é possível redimensionar as linhas do GridLayout. Se sim, como fazer?
Tenho uma tela de cadastro sempre que adiciono alguns itens estes devem aparecer em uma tabela.
Fiz o layout utilizando o grid layout, mas a parte superior precisa ser maior que a inferior, então gostaria de saber se é possível redimensionar as linhas do GridLayout. Se sim, como fazer?
Obrigada :oops:
Amigo , achei um código aqui ,mas ele foi feito em [color=red]swing swt[/color],tem que baixar o pacote ae
//Send questions, comments, bug reports, etc. to the authors://Rob Warner ([email removido])//Robert Harris ([email removido])importorg.eclipse.swt.widgets.*;importorg.eclipse.swt.layout.GridData;importorg.eclipse.swt.layout.GridLayout;importorg.eclipse.swt.SWT;publicclassGridLayoutComplex{publicstaticvoidmain(String[]args){Displaydisplay=newDisplay();Shellshell=newShell(display);GridLayoutlayout=newGridLayout();layout.numColumns=3;layout.makeColumnsEqualWidth=true;shell.setLayout(layout);// Create the big button in the upper leftGridDatadata=newGridData(GridData.FILL_BOTH);data.widthHint=200;Buttonone=newButton(shell,SWT.PUSH);one.setText("one");one.setLayoutData(data);// Create a composite to hold the three buttons in the upper rightCompositecomposite=newComposite(shell,SWT.NONE);data=newGridData(GridData.FILL_BOTH);data.horizontalSpan=2;composite.setLayoutData(data);layout=newGridLayout();layout.numColumns=1;layout.marginHeight=15;composite.setLayout(layout);// Create button "two"data=newGridData(GridData.FILL_BOTH);Buttontwo=newButton(composite,SWT.PUSH);two.setText("two");two.setLayoutData(data);// Create button "three"data=newGridData(GridData.HORIZONTAL_ALIGN_CENTER);Buttonthree=newButton(composite,SWT.PUSH);three.setText("three");three.setLayoutData(data);// Create button "four"data=newGridData(GridData.HORIZONTAL_ALIGN_BEGINNING);Buttonfour=newButton(composite,SWT.PUSH);four.setText("four");four.setLayoutData(data);// Create the long button across the bottomdata=newGridData();data.horizontalAlignment=GridData.FILL;data.grabExcessHorizontalSpace=true;data.horizontalSpan=3;data.heightHint=150;Buttonfive=newButton(shell,SWT.PUSH);five.setText("five");five.setLayoutData(data);shell.pack();shell.open();while(!shell.isDisposed()){if(!display.readAndDispatch()){display.sleep();}}display.dispose();}}