@vishal7589 you gotta put your variable name before the .getText, for example if your text field is called myTextField, the line would be: myTextField.setText();
ok i found the code for the positive and negative sign button here it is plusminus=(Double.parseDouble(String.valueOf(display.getText()))); plusminus=plusminus*(-1); display.setText(String.valueOf(plusminus));
srry i couldnt put it up when the video was made (i watched this video for the first time now) Hopefully everyone who was looking for the code found my commen :)
this is what i got for 1. why? javax.swing.JButton[,12,56,49x40,alignmentX=0.0,alignmentY=0.5,border=javax.swing.plaf.BorderUIResource$CompoundBorderUIResource@253498,flags=296,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=14,bottom=2,right=14],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=true,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=1,defaultCapable=true]
what code is used in decimalActionPerformed to check the display to see if there is already a decimal in the string, and then prevent a secondary decimal to be placed in the display?
i maked this sentence but i get error with the plusminus because i give String instead give a Double value.... you think a few please and help me, i don't understand.
This doesn't work for netbeans 6.5.1, could you help me? I want to make the calculator. Even more, this netbeans doesn't allows me to run the proyect if this is not the main proyect. I hope you can help me
what are the differences between action performance and mouse clicked?
andres123587 4 weeks ago
thanks for your video
djjagen 1 month ago
awesome!!!
sikanderzeb 2 months ago
the code is the next people... dont be so....
plusminus = Double.parseDouble(String.valueOf(display.getText()));
but in display.getText() you must use the name of your jTextField...
EldaMagalys 2 months ago
plusminus=(Double.praseDouble(Sring.value01(dis)))
What is after that?
Theonlyoneleft1000 2 months ago
dont know but instead of display, cant we use SOUT*Tab*??
herraph1 3 months ago in playlist Java Netbeans Calculator Tutorial
display.setText my netbeans cant recognise it. Help PLZZZ and also display.gettext
herraph1 3 months ago
@herraph1 same problem with me...
vishal7589 3 months ago
@vishal7589 you gotta put your variable name before the .getText, for example if your text field is called myTextField, the line would be: myTextField.setText();
FernandoPST 3 months ago
display.setText my netbeans cant recognise it. Help PLZZZ
herraph1 3 months ago
are you idiot? we cant see the plusminus code cant you move the camera idiot???
miltoskat2 5 months ago
@miltoskat2 here you go idiot
plusminus = (Double.parseDouble(String.valueOf(display.getText())));
chrissphinx 5 months ago
you can't just use the name how it is there everything wil be alright
Raotor123 5 months ago
Uhm it says Jbutton5Actionperformed instead of jbutton1actionperformed how can i delete the 5 and put into the 1
TheMrDclaws 5 months ago
display.setText(display.getText()+jButton1.getText()); does not work for me help!!
TheMrDclaws 5 months ago
@TheMrDclaws did you ever get it to work?? what was the problem cause im having the same problem
jsayram 5 months ago
ok i found the code for the positive and negative sign button here it is plusminus=(Double.parseDouble(String.valueOf(display.getText()))); plusminus=plusminus*(-1); display.setText(String.valueOf(plusminus));
srry i couldnt put it up when the video was made (i watched this video for the first time now) Hopefully everyone who was looking for the code found my commen :)
shg297 7 months ago
@MrDewloo you have to write display.setText(display.getText()+jButton1.getText());
schwamm11 7 months ago
this is what i got for 1. why? javax.swing.JButton[,12,56,49x40,alignmentX=0.0,alignmentY=0.5,border=javax.swing.plaf.BorderUIResource$CompoundBorderUIResource@253498,flags=296,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=14,bottom=2,right=14],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=true,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=1,defaultCapable=true]
MrDewloo 8 months ago
Comment removed
bandakhuss 8 months ago
Thanks Bro!
it works.
I delete the minusplus button, because it didn't work
ramblabike 9 months ago
thank u for teach me a calculator.
shail28ch 11 months ago
what code is used in decimalActionPerformed to check the display to see if there is already a decimal in the string, and then prevent a secondary decimal to be placed in the display?
dsnyder9785 1 year ago
shouldn't plus minus doesnt display as decimal?
fatcrewz 1 year ago
@fatcrewz display.setText("");
this would be it, anyway the one shown in the video.
VikingNightmare 1 year ago
what is the code for C??
MonkeyDPascua 1 year ago
great vid, but button clear doesnt erase. what is the rest of the code?? please, i need it
MonkeyDPascua 1 year ago
which library did you import in: 5:06 "java.a...."? and 5:08" javax...."?.thanks
jrmn1009 1 year ago
Very Helpful. Thanks
samadkhan2007 1 year ago
plusminus=(Double.parseDouble(display.getText()));
try if u r in 6.9.1
anupamvipul233 1 year ago
@anupamvipul233 thanks man ;)
ymerdrengene 1 year ago
THE CORRECT CODE IS --------
plusminus=(Double.parseDouble(String.valueOf(display.getText())));
plusminus=plusminus*(-1); display.setText(String.valueOf(plusminus));
dangeroussak 1 year ago
why i can't display the buttons but my codding is right is this working with 6.9.1?
tama0031 1 year ago
@tama0031 true! im trying it now. i cant get it!? fuck! help me!
danmacion 10 months ago
Is this done on NetBeans IDE 6.9.1 ? Bacause i'm not getting the popup window when you typed '"display.setText()".
Reply plz!
sansha4mail 1 year ago
part of the code that is hide is
plusminus=(Double.parseDouble(String.valueOf(display.getText())));
plusminus=plusminus*(-1);
display.setText(String.valueOf(plusminus));
//thank you I like it so much.
franciscounal 1 year ago
@franciscounal tnxx
tama0031 1 year ago
This has been flagged as spam show
Hello please help me i had copy past the code given by franciscounal
but it still did not work in 6.9.1
anupamvipul233 1 year ago
display.setText(display.getText()+jButton1.getText());
ema97sardo 1 year ago
The full code is :
plusminus=(Double.parseDouble(String.valueOf(display.getText()));
plusminus=plusminus*(-1);
display.setText(String.value.Of(plusminus));
AppsForFree 1 year ago
display.setText(display.getText()+jButton1...
please!!!
wilan7 1 year ago
@wilan7
.getText()
Europemaster 1 year ago
your video suck i cant see the rest of the code
legionz200 1 year ago
cooool
hiyazan 1 year ago
What's in the rest of plusminus=(Double.parseDouble(String.valueOf(display...? Didn't really get to see it.
FlablessGuy 1 year ago
thanks for the solution i will try it
etaxalo 2 years ago
i use the 6.5 of netbeans and fron this line
display.setText(display.getTex t()+jButton1.getText());
it doesnt like the "display" word any ideas why?
etaxalo 2 years ago
"display" is the name for the text field where things are displayed
julesbond07 2 years ago
@etaxalo display if a variable name for the textfield
thuzhar 1 year ago
how him maked this sentence?
i maked this sentence but i get error with the plusminus because i give String instead give a Double value.... you think a few please and help me, i don't understand.
goldar15 2 years ago
but what if the decimal button is clicked more than once?
lashemaxej 2 years ago
@lashemaxej you can just put an message saying "error dumb ass try again"
thuzhar 1 year ago
At 5:00
plusminus=(Double.parseDouble( String.valueOf(display.getText ())));
You can do this code instead since display's value is already a string
plusminus=(Double.parseDouble(display.getText()));
String.valueOf only converts any other data type to String so it's kinda redundant that you did "String.valueOf(display.getText())
EeyoreXD 2 years ago
posneg=(Double.parseDouble(pantalla.getText())); posneg=posneg*(-1);
This doesn't work for netbeans 6.5.1, could you help me? I want to make the calculator. Even more, this netbeans doesn't allows me to run the proyect if this is not the main proyect. I hope you can help me
nonsilverio 2 years ago
you can use: "Double.valueOf(pan talla.getText()).doubleValue"
julesbond07 2 years ago
thanks
saddamdon 2 years ago
@EeyoreXD thanks for the help
critenks229 1 year ago
I learned a lot thanks to your video!
jhonjairo6230 2 years ago
hey!!!..what about the jButton0?..on my java it appears like this.."jButton10"...how can i make it and change it into "0"digits?....
ValXander 2 years ago
@ValXander right click then edit text
thuzhar 1 year ago
at 2:15 private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { display.setText(display.getText()+jButton1.getText()); }
Zakidream 2 years ago
thanks
saddamdon 2 years ago
I can`t see what he wrote at 5:15 in the +/- button
anybody knows?
donovanlb 2 years ago
thanks very helping
nudelmanarie 2 years ago
@nudelmanarie i think its helpfull
thuzhar 1 year ago
for those who don't know what the guy types at 2:19, like one said, it is
"display.setText(display.getText()+jButton1.getText());"
also you can see it at 2:23
luengsc 2 years ago
it didnt work for me it said it cant find symbol jbutton1
wiremod 2 years ago
nvm i git it to work
wiremod 2 years ago
.....are you kidding? the guy did more than 300 lines for a simple calculator and in "pearl" you can do it in less than 10 ... !
luengsc 2 years ago
plusminus=(Double.parseDouble(String.valueOf(display.getText()))); plusminus=plusminus*(-1);
display.setText(String.valueOf(plusminus));
fawzar 2 years ago
can anyone answer me, in the method of c button when i write display.setText("");
he said cannot find a symble(disply), is it need kind of import ? or what is the problem? thanks.
justen84 3 years ago
and near the end for the +/- button what did oyu type? i can't see!
Obliviboy12 3 years ago
i think:
plusminus= Double.parseDouble(String.valueOf
(display.getText()));
Giallo81 2 years ago
2:19, wtf are you typing????
Obliviboy12 3 years ago
needs music
MattPixInc 3 years ago
thanks... this helped me a lot, please keep doing tutorials like this... :)
cisco182 3 years ago