Loading...
Uploaded by mdumser on Sep 22, 2008
Coding the equals button.
Education
Standard YouTube License
@MrDarkzone93 bit late but here is the script for plusminus. you couldnt see it in the video but i kinda made it up as i went and it works.. :)
plusminus=(Double.parseDouble(String.valueOf(display.getText()))); plusminus=plusminus*(-1);
display.setText(String.valueOf(plusminus));
espaach 3 weeks ago
Good
coffeedelta 1 month ago
@pohasche Oh I see, this might help. Thank you!
ShyneBrady 1 month ago
@ShyneBrady no, you needn't. In calculate function(equalsActionPerformed in our case) you should write firstDouble=totalDouble instead of firstDouble=0.
pohasche 1 month ago
I didn't try this but what if you got something like: 1+2+3?
So you need a thirdDouble and so on???
what is the code of plusminus?
MrDarkzone93 3 months ago
java is nice
TheACCmy 3 months ago
thanks for the video, it really help me
cindsheil 4 months ago
thanks for the video
Hey but you didn't told about when to store the firstvalue of display ..i mean at which control.. :|
cyrilvimal 5 months ago
Load more suggestions
@MrDarkzone93 bit late but here is the script for plusminus. you couldnt see it in the video but i kinda made it up as i went and it works.. :)
plusminus=(Double.parseDouble(String.valueOf(display.getText()))); plusminus=plusminus*(-1);
display.setText(String.valueOf(plusminus));
espaach 3 weeks ago
Good
coffeedelta 1 month ago
@pohasche Oh I see, this might help. Thank you!
ShyneBrady 1 month ago
@ShyneBrady no, you needn't. In calculate function(equalsActionPerformed in our case) you should write firstDouble=totalDouble instead of firstDouble=0.
pohasche 1 month ago
I didn't try this but what if you got something like: 1+2+3?
So you need a thirdDouble and so on???
ShyneBrady 1 month ago
what is the code of plusminus?
MrDarkzone93 3 months ago
java is nice
TheACCmy 3 months ago
thanks for the video, it really help me
cindsheil 4 months ago
thanks for the video
cindsheil 4 months ago
Hey but you didn't told about when to store the firstvalue of display ..i mean at which control.. :|
cyrilvimal 5 months ago