I have a small improvement: As the code is now, you can click the decimal-button after the equals(answer)-button and get a second decimal in the display - yielding an error. To remove this way of adding a second decimal, add a new variable called "int equalsClick;" in the top of the code. In the code for the clear button add: "equalsClick=0;" and in the equals-button code add: "equalsClick=1;". Finally in the decimal-button code replace the "if" code with "if(decimalClick==0 && equalsClick==0)"
yeah its so helping and enjoyable. thank for video. but i think there should a tag on display cause we try to calculate a huge amount the numbers are out of display. is this possible to restrict display up to limited numbers??
use this code on button: plusminus = (Double.parseDouble(String.valueOf(display.getText()))); plusminus = plusminus*(-1); display.setText(String.valueOf(plusminus));
so, when you type all these things and finish calculator, does it only works on PC or I can send this to my cell phone ( of course the one that supports java ) and use it normaly ? thanks
Thank you very much. My 11 year old son and I are both beginners at programming and at NetBeans. These five videos show a good deal of what we needed to learn to get started. We are copying every step and by doing so learning a great deal.
I very much appreciate you taking the time to make the videos. We will pass on the good karma. Thanks again.
very nice, shotty camera work, like most people had to search thru carefully for what you wrote sometimes. but it works, which was the point i guess, so kudos.
good vids followed them through. really helpful thanks
- although just so u know sometimes u cannot see what u have written(took a bit of pausing just at the right moment :P), i think it happens in vid 3 most
verryy good i am beginner for swings ,it ws verry helpfull
to save memory u culd have used boolean :) rather that =0 and >0 ,boolean is meant fr the same :)
mayank16125 1 month ago
I have a small improvement: As the code is now, you can click the decimal-button after the equals(answer)-button and get a second decimal in the display - yielding an error. To remove this way of adding a second decimal, add a new variable called "int equalsClick;" in the top of the code. In the code for the clear button add: "equalsClick=0;" and in the equals-button code add: "equalsClick=1;". Finally in the decimal-button code replace the "if" code with "if(decimalClick==0 && equalsClick==0)"
251progression 2 months ago
@251progression hey dude, thx fr highlighting
same was in my mind earlier :)
by the way,there is no need to take another variable,
jst make decimalClick=1 on equal to press.
mayank16125 1 month ago
thanx for the tutorials, its help me alot
Abang010483 2 months ago
not complete ¬¬
darkal64 3 months ago
tnx much for this... ^_^ hope you can share more good application using netbeans... here is my email: act_fellado@yahoo.com
tnx much2x...
sixdyingbottles 5 months ago
man how about backspace? can anyone help me with backspace??
xXxjheyxXx 6 months ago
@xXxjheyxXx try this StringBuilder sb=new StringBuilder(display.getText()); sb=sb.delete(sb.length()-1, sb.length()); display.setText(sb.toString());
pohasche 4 weeks ago
yeah its so helping and enjoyable. thank for video. but i think there should a tag on display cause we try to calculate a huge amount the numbers are out of display. is this possible to restrict display up to limited numbers??
waseemtus 8 months ago
yes
mdumser 4 months ago
@mdumser mdumser im having trouble with the clear button
theobagy 4 months ago
thanks for doing this video, i learned a lot . Though the +/- button couldn't make it work
emartinez117 8 months ago
@emartinez117
+/- button works
use this code on button: plusminus = (Double.parseDouble(String.valueOf(display.getText()))); plusminus = plusminus*(-1); display.setText(String.valueOf(plusminus));
itseasy21 2 months ago
thanks very much. Happy Easter man!
1983xita 10 months ago
so, when you type all these things and finish calculator, does it only works on PC or I can send this to my cell phone ( of course the one that supports java ) and use it normaly ? thanks
milek021 10 months ago
a million thanks to you mdumser!!! u're d best! :)) God bless you!
kisshane1 11 months ago
Thank u
ismavolk 1 year ago
thanxxxx
wswasss 1 year ago
vielen dank mdumuser...du bist sehr nett!
bist du die Deutschejunge?
andrewbrucky 1 year ago
THANK YOU SO MUCH BROW!!!
god bless
ymerdrengene 1 year ago
Thank you bro!
Irvc7 1 year ago
Thank You very much ^______^
You help me!!!
taaa088 1 year ago
Comment removed
taaa088 1 year ago
ThankSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
laila2286 1 year ago
thanks my brother......
TheIqbalsingh 1 year ago
What about multiple "0"'s and "." at the beggining?
Kozimierz 1 year ago
This has been flagged as spam show
Dúvida!!!
Como faz para fazer isso?
10+10+10=30 e não 10+10+10=20
eu não consegui fazer ela funcionar deste modo, fica sendo obrigado a pressionar = sempre
ajon101180 1 year ago
Dúvida!!!
Como faz para fazer isso?
10+10+10=30 e não 10+10+10=20
eu não consegui fazer ela funcionar deste modo, fica sendo obrigado a pressionar = sempre
ajon101180 1 year ago
@ajon101180 even i didn't understood what u said, but the example makes it clear, there is another
click 5 => Display = "5"
click any operator => First double = "5" & Display = ""
click any operator again => First double = ""
ERRORRRR
LeoNazDo 1 year ago
Aula muito boa, estou comecei a gostar de programar em Java
ajon101180 1 year ago
Thanks Mike
MaduraSL 1 year ago
Thanks Mike!!
braevbird 2 years ago
Thanks ;)
KabatZ90 2 years ago
!(display.getText().contains(".")) is a lot easier than this guys, just put that in ur if statement
Rosstacular 2 years ago
Thank you a lots... I am starting with Java and I learned so much here... Thank you..
dreamvzla 2 years ago
GRACIAS MEN...THANKS...BUT IF YOU DO
14+2-5, FOR EXAMPLE, YOU NEED CHANGE THE CODE TO
private void minusActionPerformed(java.awt.event.ActionEvent evt) { firstdouble=(Double.parseDouble(String.valueOf(display.getText()))); display.setText(""); minusclick=1; plusclick=multiplyclick=divideclick=0; decimalclick=0; }
AND DO THE SAME CHANGE TO THE +,* AND / BUTTONS...
smr90050858366 2 years ago
@smr90050858366 I cannot make that change work properly :(
kit8320 9 months ago
do you have a podcast or something like it?!
mygem01 2 years ago
tres bien ! how make that the numbers still in display and show operation what you for example 44+66 and after you put equals it show 100
MsMarat111 2 years ago
Hey did u think about this? if some one press 0 at the beginning then he press 1 so there will be a number like
"01"
so we should also prevent keeping '0' as the first digit !!! Got it ?
rclakmal 2 years ago
aguante mdumser
angobaldokingkong2 2 years ago
Gracias, bastante bueno.
manvehe 2 years ago
sehr gutes Video mit lerneffekt!
das ein oder andere mal konnte man den Quellcode schlecht lesen aber ansonsten TOP!
drache01 2 years ago
Danke fuer den Kommentar. Du meinst bei Nummer Drei(?), ja da ging mir die Zeit aus um es wieder zumachen. :)
mdumser 2 years ago
Thank you very much!!!!!!!!!!
but there is another think to make the decimal work correctly by adding
to posneg button this line
decimalClik=1;
because it set as decimal
yogioh 2 years ago
the same think to equal button
yogioh 2 years ago
excelente
richarparrao 2 years ago
sos un groso
richarparrao 2 years ago
great!!!!!!!!!!!!
i loved it!!!!!!!!!11
nudelmanarie 2 years ago
that is very useful but is there a way to run it without netbeans open plz respond
wiremod 2 years ago
Not sure, maybe by running it through DOS.
mdumser 2 years ago
build it in netbeans then go to the dist folder under where you saved it and run the jar file.
greg3omg 2 years ago
what the name of the file
yogioh 2 years ago
whatever you named the project. the file extension should be .jar
greg3omg 2 years ago
@mdumser export it as an executable .jar
helloaidan 1 year ago
@wiremod you could create it as an applet, that way it will be possible (among others) to run it in the web browser ^^
UnplugPiranna 1 year ago
Thank you very much. My 11 year old son and I are both beginners at programming and at NetBeans. These five videos show a good deal of what we needed to learn to get started. We are copying every step and by doing so learning a great deal.
I very much appreciate you taking the time to make the videos. We will pass on the good karma. Thanks again.
BigBrauner 2 years ago
Thx a Lot
Muchas gracias, me fue muy util
fuckthesystem2k09 2 years ago
Thank you so much!
This helped me loads.
jodyyyyyyyy 2 years ago
thank you a lot =)
nobody155 2 years ago
thank u....it really helps.
k0p0l 2 years ago
very nice, shotty camera work, like most people had to search thru carefully for what you wrote sometimes. but it works, which was the point i guess, so kudos.
TheRoamingMinstrel 3 years ago
good vids followed them through. really helpful thanks
- although just so u know sometimes u cannot see what u have written(took a bit of pausing just at the right moment :P), i think it happens in vid 3 most
Russ078188 3 years ago 3
I know, sorry about the video. Kinda new at it.
mdumser 2 years ago