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
Post a Comment