[英]SQLite - Select text and get value to Textfield in Codename One for Java
[英]Codename one - get value from text area using GUI(codename one designer) while coding using java coding on NetBeans
由於某種原因,我無法從名為“ txtNum1”和“ txtNum2”的文本區域獲取值,正在使用“ txtNum1.getText()”和“ txtNum2.getText()”,它甚至無法識別我使用的“ txtNum1” GUI構建器。 難道我做錯了什么?
protected void onMain_BtnAction(Component c, ActionEvent event) {
String num1 = txtNum1.getText();
String num2 = txtNum2.getText();
calc(Integer.parseInt(num1),Integer.parseInt(num2));
}
采用:
String num1 = findTextNum1(c).getText();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.