how can I create a TextField ..plz help me out in LWUIT
TextField pin = new TextField ("",TextField.PASSWORD|TextField.URL);
cashpayform.addComponent(pin);
cas开发者_Go百科hpayform.show();
cashpayform.addCommand(exit);
cashpayform.setCommandListener(this);
cashpayform.show();
Use this code,
Form form = new Form("Sample");
form.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
TextField textField = new TextField();
textField.setConstraint(TextField.PASSWORD | TextField.URL);
textField.setMaxSize(100);
form.addComponent(textField);
form.addCommand(new Command("Exit") {
public void actionPerformed(ActionEvent evt) {
notifyDestroyed();
}
});
form.show();
TextField tf = new TextField();
tf.setConstraint(TextArea.PASSWORD | TextArea.URL);
make sure that TextField and Form are classes of lwuit
精彩评论