Ajuda com Jface

0 respostas
G

Bom dia, gostaria da ajuda de alguem pois necessito colocar dois text fields na frente de usuario login e senha, se alguem puder me ajudar, eu estou colocando meu codigo aqui para se puderem analisa-lo, eu estou precisando de quando eu chamar o metodo import essa minha janela fique invisivel.

public class Cliente01 extends TitleAreaDialog {
	private Button btnImport;
	private Text t;
	private Text t2;
	private Text t3;
	private Text t4;
	public Cliente01(Shell parentShell) {
		super(parentShell);
	}

	public static void main(String[] args) {
		new Cliente01(new Shell()).open();
	}
	
	

	@Override
	protected Control createDialogArea(Composite parent) {
		Composite composite = new Composite(parent, SWT.NONE);
		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
		GridLayout layout = new GridLayout(2, false);
		composite.setLayout(layout);

		Label l = new Label(composite, SWT.NONE);
		l.setText("Nome");
		t = new Text(composite, SWT.BORDER);
		Label l2 = new Label(composite, SWT.NONE);
		l2.setText("Login");
		t2 = new Text(composite, SWT.BORDER);
		Label l3 = new Label(composite, SWT.NONE);
		l3.setText("Senha");
		t3 = new Text(composite, SWT.BORDER);
		Label l4 = new Label(composite, SWT.NONE);
		l4.setText("Tel");
		t4 = new Text(composite, SWT.BORDER);

		return super.createDialogArea(parent);
	}

	@Override
	protected void createButtonsForButtonBar(Composite parent) {
		btnImport = this.createButton(parent, 2, "Import", false);
		btnImport.addSelectionListener(new SelectionListener() {

			@Override
			public void widgetDefaultSelected(SelectionEvent arg0) {
			}

			@Override
			public void widgetSelected(SelectionEvent arg0) {
				importPressed();
			}

		});
		super.createButtonsForButtonBar(parent);
	}

	private void importPressed() {
		Cliente02 c = new Cliente02(new Shell());
		c.open();
	}

	@Override
	protected void okPressed() {
		super.okPressed();
	}

}
Criado 21 de setembro de 2009
Respostas 0
Participantes 1