Java Eclipse input validation -


so here is: i'm writing (swt)program.in form, have 2 text fields , button, when pressing button validate (string)text fields. asking user input if nothing in textfields?

hopefully question makes sense thank in advance!!

you must manually, adding listern button. if textfield called textfield , yout button button, like:

\\previous code button.addlistener(swt.selection, new listener() {   public void handleevent(event e) {     switch (e.type) {     case swt.selection:       if(textfield.gettext() == null || textfield.gettext().isempty()) ; //here validate       break;     }   } }); 

Comments

Popular posts from this blog

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -