New course! Every coder should learn Generative AI!
Try a free lesson0
create an actionlistener to your jbutton
inside fetch the text from your textfields using getText. then convert them into interger using Integer.parseInt
do your calculation, convert the result back to string then put it in textfield C using settext