gpt4 book ai didi

java - 如何将用户名和密码字段输入 Blackberry 文本框?

转载 作者:行者123 更新时间:2023-12-02 07:50:06 25 4
gpt4 key购买 nike

如何将用户名和密码字段放入文本框中?

usernameField = new EditField("USERNAME:", "");
passwordField = new PasswordEditField("PASSWORD:", "");
add(usernameField);
vm.add(new LabelField("\n"));
add(passwordField);
ButtonField buttonField_1 = new ButtonField( "Login",ButtonField.FIELD_HCENTER );
add( buttonField_1 );
ButtonField buttonField_2 = new ButtonField( "Forgot Password",ButtonField.FIELD_HCENTER );
add( buttonField_2 );
buttonField_1.setMargin(100, 10, 10, 10);
//popup1();
buttonField_1.setChangeListener( new FieldChangeListener() {
public void fieldChanged( Field arg0, int arg1 ) {
if (usernameField.getTextLength() == 0 || passwordField.getTextLength() == 0) {
Dialog.alert("You must enter a username and password");
} else {
profile();
}
}
});

buttonField_2.setChangeListener( new FieldChangeListener() {
public void fieldChanged( Field arg0, int arg1 ) {
UiApplication.getUiApplication().pushScreen(new Forgot_Pwd());
}
});

最佳答案

http://keraisureshvblackberry.blogspot.in/2012/02/on-last-post-we-have-study-lablefiled.html

此博客可帮助您创建用户名和密码文本框

如果您从归档中获取文本,则可以使用usernameField.getText()passwordField.getText()

关于java - 如何将用户名和密码字段输入 Blackberry 文本框?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10328387/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com