if (username.getText()==null || username.getText().trim().isEmpty())
ant -f "G:\\Codename One\\CodenameOne" -Dnb.internal.action.name=rebuild clean jarNo GUI Entries availableinit:deps-clean:Updating property file: G:\Codename One\CodenameOne\build\built-clean.propertiesDeleting directory G:\Codename One\CodenameOne\buildrefresh-libs:Deleting directory G:\Codename One\CodenameOne\lib\implclean:No GUI Entries availableinit:deps-jar:Created dir: G:\Codename One\CodenameOne\buildUpdating property file: G:\Codename One\CodenameOne\build\built-jar.propertiesCreated dir: G:\Codename One\CodenameOne\build\classesCompile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller code size and wider device supportCreated dir: G:\Codename One\CodenameOne\build\tmpCompiling 1 source file to G:\Codename One\CodenameOne\build\tmpG:\Codename One\CodenameOne\src\com\mycompany\myapp\mainclassZ.java:103: error: cannot find symbol if (username.getText()==null || username.getText().trim().isEmpty()){ symbol: method isEmpty() location: class String1 errorG:\Codename One\CodenameOne\build.xml:57: Compile failed; see the compiler error output for details.BUILD FAILED (total time: 2 seconds)
Form login = new Form("Login"); setBackCommand(login); TextField username = new TextField("","Username", 20, TextField.INITIAL_CAPS_WORD); TextField password = new TextField("", "Password", 20, TextField.PASSWORD); Button userlogin = new Button("Login"); userlogin.addActionListener(new ActionListener(){ @Override public void actionPerformed(ActionEvent evt){ if (logged==false){ if (username.getText()==null || username.getText().trim().isEmpty()){ Dialog.show("Warning!", "Please, fill all the fields!", "Ok","Cancel"); } else{ //How do I add the textfield content to the variables user1 and pass1? Dialog.show("Logged in!", "Log in successful! Welcome "+user1+"!", "Ok", "Close Dialog"); logged=true; user1=username.getText(); pass1=password.getText(); } } else Dialog.show("Warning!", "You are already logged into an account please log out first!","Ok", "Cancel"); } });
--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/94bb2e3f-68d2-4a33-ae70-b904923633fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.