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

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -