java - How to calculate a value from an action listener -


i building program gui , trying program calculate if driver on or under limit. using action listener in order read user going type in.

public void calculation() {      if(txtspeed > txtlimit){          system.out.println("the dirver on limit");     }     else{         system.out.println("the driver under limit");     }  class vhlimithandler implements actionlistener{     public void actionperformed(actionevent event){          txtlimit = double.parsedouble(textlimit.gettext());      } }  class vhspeedhandler implements actionlistener{     public void actionperformed(actionevent event){          txtspeed = double.parsedouble(textspeed.gettext()); 


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -