Results 1 to 2 of 2
  1. #1
    nksjolinder is offline Member
    Join Date
    Sep 2011
    Posts
    11
    Rep Power
    0

    Default jbutton calculation

    Hey guys,

    I know this may seem like a very dumb question but i am wondering how to make an action happen once i press a button on my jframe. For example, if i press the button i've named calculate, i want it to be able to take values from two texts boxes and multiply them. My biggest setback is that i am not sure what to do to make this calculation happen when i press the button. I know how to write out the calculation for the most part, I would just like to know how i specify that it is to happen when i press the button only and no other time. Is it something to do with an event handler?

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,572
    Rep Power
    25

    Default Re: jbutton calculation

    Look at listeners. Go to this site and Find Event Listeners
    The Really Big Index

Similar Threads

  1. Replies: 13
    Last Post: 08-19-2011, 12:23 AM
  2. Help with calculation - any help will be great!
    By venictus in forum New To Java
    Replies: 6
    Last Post: 08-17-2011, 11:05 PM
  3. Need help with displaying calculation
    By bamagirl31 in forum New To Java
    Replies: 1
    Last Post: 05-25-2011, 04:52 AM
  4. Need help with doing a calculation in Java
    By John D. in forum New To Java
    Replies: 6
    Last Post: 02-24-2009, 11:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •