gpt4 book ai didi

java - 如何向 BlackBerry 应用程序添加简单的表单字段?

转载 作者:行者123 更新时间:2023-12-01 15:55:50 26 4
gpt4 key购买 nike

假设我有一个从 MainScreen 继承的类,如何设置几个表单字段以供用户输入?

最佳答案

    // Inside the constructor

LabelField label1 = new LabelField("Hello World Demo" , LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);

EditField firstNameEditField = new EditField(EditField.NO_NEWLINE | EditField.NON_SPELLCHECKABLE | EditField.NO_COMPLEX_INPUT);

EditField lastNameEditField = new EditField(EditField.NO_NEWLINE | EditField.NON_SPELLCHECKABLE | EditField.NO_COMPLEX_INPUT);

ButtonField submitButton = new ButtonField("Submit")
{
protected boolean navigationClick(int status, int time)
{
onSubmit();

return true;
}
};

this.add(label1);
this.add(firstNameEditField);
this.add(lastNameEditField);
this.add(submitButton);

关于java - 如何向 BlackBerry 应用程序添加简单的表单字段?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5066146/

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