Josh Thompson

Greenhorn
+ Follow
since Sep 10, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Josh Thompson

I have an assignment for my Java beginners class where I have to code the + JButton, -JButton, * JButton,and the / JButton. Only problem is I'm not sure how to start it. I know I have to obtain the user input from the first number JTextField and the second number JTextField. I've forgotten how to obtain that though. I'm thinking it's something like firstNumberJTextField.getText (); but when I do that NetBeans just throws up a red error box.



That's where I have to write the code to obtain the user input from both number JTextFields. I have to convert those numbers to int values and assign the number to int variables number1 and number2. Then I have to add the numbers and assign the result to the int variable result. Then display that number in the resultJtextField.

Much appreciated if anyone can help me with this.
13 years ago