Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sample GUI program to add two numbers

 
Sunali Anu
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can some body give me a sample program to add two text fields which takes numbers as the input and give me output by adding the two numbers upon clicking a 'add' button.

Thanks much.
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That sounds like a great homework assignment. Do you have any code yet? What are your specific questions about this?
 
Sunali Anu
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nevermind... I figured it out.. I had questions about the ActionListeners needs to be implemented to do this... But i know what they are now... Thanks...
 
Amit Ghorpade
Bartender
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
But still if you want to give a try, I would recommend the use of an applet because it is pretty simple and easy to use than an application (just for learning purpose) because here you wont require any frame, container,nothing.So you dont wast time in getting other things done.



Hope this helps
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic