What's new

Java Jframe

  • Thread starter toa matoro
  • Start date
  • Views 217
T

toa matoro

Enthusiast
Messages
94
Reaction score
8
so i have to make a program thats ask for user input for integers. then they could add all the integer, sum odd, or sum even so basically what im asking is when i add a sum all button how do i make it appear in the text field

http://imgur.com/U4LXEOa
 
M

MatthewH

Member
Messages
1,604
Reaction score
629
Your question isn't really making much sense.
Elaborate more.
 
T

toa matoro

Enthusiast
Messages
94
Reaction score
8
Your question isn't really making much sense.
Elaborate more.
need to know how to program the sum all button so it shows the answer on the textfield on the bottom of the program
 
M

MatthewH

Member
Messages
1,604
Reaction score
629
What are you trying to sum? Everything in the list?
 
I

Im4eversmart

The hacks are real
Messages
2,161
Reaction score
1,903
need to know how to program the sum all button so it shows the answer on the textfield on the bottom of the program
Assuming you have the answer:

Use a button listener.
Attach it to the sum all button.
In the listener method, call setText on the text field. You can use String.valueof(number) if it doesn't like the parameter.
 
Top Bottom