jTextField Simpe Addition - how to ? - Netbeans 6.0
i have a problem that for many people who know Java may 'll seems funny .
In NetBeans 6.0, i have three jTextFields and one Button1 .
jTextField1, jTextField2, jTextField3, Button1 .
to the jTextField1 and jTextField2 i gave for text value the number of 30 so that we have that jTextField1 =30 and jTextField2 = 30 .
I want when i click on the button1 (jButton1MouseClicked) addition to start and to get the sum of the first and second jTextField, so 30+30 = 60 .
This 60, i want to be written into jTextField3 .
I tried lot of ways but no success :( :confused:
..please help ;)
waiting for your answers , thankx in advance !
var text1 = document.getElmentById('txt1');
var value1 = text1.value.parseInt();
var text2 = document.getElmentById('txt1');
var value2 = text2.value.parseInt();
var text3 = document.getElmentById('txt2');
text3.value = value1+value2;
I hope this answer can fit for you requirement!