Read only TextBox : TextBox « GWT « Java






Read only TextBox

 

package com.java2s.gwt.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.TextBox;

public class GWTClient implements EntryPoint {

  public void onModuleLoad() {

    TextBox readOnlyTextBox = new TextBox();
    readOnlyTextBox.setReadOnly(true);
    readOnlyTextBox.setText("read only");

    RootPanel.get().add(readOnlyTextBox);
  }
}


           
         
  








GWT-readOnlyTextBox.zip( 2 k)

Related examples in the same category

1.TextBox KeyListener
2.TextBox ClickListener
3.Using TextItem to create a text field and hint (Smart GWT)Using TextItem to create a text field and hint (Smart GWT)
4.Selection on focus for TextItem (Smart GWT)Selection on focus for TextItem (Smart GWT)