Added: 3 years ago
From: mdumser
Views: 69,333
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (76)

Sign In or Sign Up now to post a comment!
  • what are the differences between action performance and mouse clicked?

  • thanks for your video

  • awesome!!!

    

  • the code is the next people... dont be so....

    plusminus = Double.parseDouble(String.valu­eOf(display.getText()));

    but in display.getText() you must use the name of your jTextField...

  • plusminus=(Double.praseDouble(­Sring.value01(dis)))

    What is after that?

  • dont know but instead of display, cant we use SOUT*Tab*??

  • display.setText my netbeans cant recognise it. Help PLZZZ and also display.gettext

  • @herraph1 same problem with me...

  • @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();

  • display.setText my netbeans cant recognise it. Help PLZZZ

  • are you idiot? we cant see the plusminus code cant you move the camera idiot???

  • @miltoskat2 here you go idiot

    plusminus = (Double.parseDouble(String.val­ueOf(display.getText())));

  • you can't just use the name how it is there everything wil be alright

  • Uhm it says Jbutton5Actionperformed instead of jbutton1actionperformed how can i delete the 5 and put into the 1

  • display.setText(display.getTex­­t()+jButton1.getText()); does not work for me help!!

  • @TheMrDclaws did you ever get it to work?? what was the problem cause im having the same problem

  • 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 :)

  • @MrDewloo you have to write display.setText(display.getTex­t()+jButton1.getText());

  • this is what i got for 1. why? javax.swing.JButton[,12,56,49x­40,alignmentX=0.0,alignmentY=0­.5,border=javax.swing.plaf.Bor­derUIResource$CompoundBorderUI­Resource@253498,flags=296,maxi­mumSize=,minimumSize=,preferre­dSize=,defaultIcon=,disabledIc­on=,disabledSelectedIcon=,marg­in=javax.swing.plaf.InsetsUIRe­source[top=2,left=14,bottom=2,­right=14],paintBorder=true,pai­ntFocus=true,pressedIcon=,roll­overEnabled=true,rolloverIcon=­,rolloverSelectedIcon=,selecte­dIcon=,text=1,defaultCapable=t­rue]

  • Comment removed

  • Thanks Bro!

    it works.

    I delete the minusplus button, because it didn't work

  • thank u for teach me a calculator.

  • 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?

  • shouldn't plus minus doesnt display as decimal?

  • @fatcrewz display.setText("");

    this would be it, anyway the one shown in the video.

  • what is the code for C??

  • great vid, but button clear doesnt erase. what is the rest of the code?? please, i need it

  • which library did you import in: 5:06 "java.a...."? and 5:08" javax...."?.thanks

  • Very Helpful. Thanks

  • plusminus=(Double.parseDouble(­display.getText()));

    try if u r in 6.9.1

  • @anupamvipul233 thanks man ;)

  • THE CORRECT CODE IS --------

    plusminus=(Double.parseDouble(­String.valueOf(display.getText­())));

     plusminus=plusminus*(-1); display.setText(String.valueOf­(plusminus));

  • why i can't display the buttons but my codding is right is this working with 6.9.1?

  • @tama0031 true! im trying it now. i cant get it!? fuck! help me!

  • Is this done on NetBeans IDE 6.9.1 ? Bacause i'm not getting the popup window when you typed '"display.setText()".

    Reply plz!

  • 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 tnxx

  • display.setText(display.getTex­t()+jButton1.getText());

  • The full code is :

    plusminus=(Double.parseDouble(­String.valueOf(display.getText­()));

    plusminus=plusminus*(-1);

    display.setText(String.value.O­f(plusminus));

  • display.setText(display.getTex­t()+jButton1...

    please!!!

  • @wilan7

    .getText()

  • your video suck i cant see the rest of the code

  • cooool

  • What's in the rest of plusminus=(Double.parseDouble(­String.valueOf(display...? Didn't really get to see it.

  • thanks for the solution i will try it

  • 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?

  • "display" is the name for the text field where things are displayed

  • @etaxalo display if a variable name for the textfield

  • 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.

  • but what if the decimal button is clicked more than once?

  • @lashemaxej you can just put an message saying "error dumb ass try again"

  • 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.getTex­t())

  • posneg=(Double.parseDouble(pan­talla.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

  • you can use: "Double.valueOf(pan talla.getText()).doubleValue"

  • thanks

  • @EeyoreXD thanks for the help

  • I learned a lot thanks to your video!

  • 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 right click then edit text

  • at 2:15 private void jButton1ActionPerformed(java.a­wt.event.ActionEvent evt) { display.setText(display.getTex­t()+jButton1.getText());  }

  • thanks

  • I can`t see what he wrote at 5:15 in the +/- button

    anybody knows?

  • thanks very helping

  • @nudelmanarie i think its helpfull

  • for those who don't know what the guy types at 2:19, like one said, it is

    "display.setText(display.getTe­xt()+jButton1.getText());"

    also you can see it at 2:23

  • it didnt work for me it said it cant find symbol jbutton1

  • nvm i git it to work

  • .....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 ... !

  • plusminus=(Double.parseDouble(­String.valueOf(display.getText­()))); plusminus=plusminus*(-1);

     display.setText(String.valueOf­(plusminus));

  • 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.

  • and near the end for the +/- button what did oyu type? i can't see!

  • i think:

    plusminus= Double.parseDouble(String.valu­eOf

    (display.getText()));

  • 2:19, wtf are you typing????

  • needs music

  • thanks... this helped me a lot, please keep doing tutorials like this... :)

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more