TextField dissapear in TableLayout in LWUIT Java ME

174 views Asked by At

I've searched for this problem but still can not find the solution. By the way my level of Google Translate is ugly (I speak Spanish). Well, the thing is that I want my application form looks as follows:

Or maybe so:

The problem is that when I want to, text fields disappear I do not know why is that.

Here is my code:

TableLayout tableLayout = new TableLayout(3, 2);    
    this.setLayout(tableLayout);
    //this.addCommandListener(this);

    TableLayout.Constraint colum1 = tableLayout.createConstraint();     
    colum1.setWidthPercentage(35);  
    lblCodigo = new Label("Codigo :");
    this.addComponent(colum1, lblCodigo);

    TableLayout.Constraint colum2 = tableLayout.createConstraint();
    colum2.setHorizontalAlign(Component.LEFT);
    colum2.setWidthPercentage(65);      
    txtCodigo = new TextField();        
    this.addComponent(colum2, txtCodigo);


    TableLayout.Constraint span = tableLayout.createConstraint();
    span.setWidthPercentage(100);
    span.setHorizontalAlign(Component.CENTER);
    span.setHorizontalSpan(2);      
    btnBuscar = new Button("Buscar");       
    //btnBuscar.setPreferredW(50);      
    this.addComponent(span, btnBuscar);

Well, I'm working with LWUIT 1.4, Java ME SDK 3.0.

I tried that with LWUIT 1.5.

Does anyone have an idea why the text boxes disappear?

0

There are 0 answers