Square root function in calculator

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Feb 2006
Posts: 24
Reputation: nemo is an unknown quantity at this point 
Solved Threads: 0
nemo's Avatar
nemo nemo is offline Offline
Newbie Poster

Square root function in calculator

 
0
  #1
Apr 23rd, 2007
I am trying to make a simple GUI based calculator for my homework.
my +,-,*, and sqr functions work fine. i have to implement sqrt function for one of my JButton.

am trying but have no clue what to put in event handler here

else if(event.getSource() == sqrt) {
.......
}

can someone enlighten me please.

nemo
Mathematics possesses not only truth, but supreme beauty …
Bertrand Russell
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,213
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 489
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: Square root function in calculator

 
0
  #2
Apr 23rd, 2007
java.lang.Math
http://java.sun.com/javase/6/docs/ap...uble,%20double)

Hope it does not requere any comment
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC