To answer your question in the title...
You need to get the text within the textboxes and parse it as a number:
int num1 = Integer.parseInt(num1Name.getText());
int num2 = Integer.parseInt(num2Name.getText());
int result = num1 + num2;
num3Name.setText(Integer.toString(result));
where num3Name
is a JTextField
(which you can use to store your result)
This can at least point you in the right direction.