DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004

    Unhappy calculator applet

    i just started to learn java, and i want to program a basic calculator applet but i dont know where to start. all i need are two buttons and three text areas. all this needs to do is add two integers together, and display the result in one of the text areas. please help. thanks!

  2. #2
    Join Date
    Feb 2004
    well which part of it are you having trouble with? You'll need event handlers for the buttons, when the buttons are pressed get the numbers from the text fields and do whatever the button is for, then print out the result to the textarea.

  3. #3
    Join Date
    Apr 2004

    calc app

    to be honest, i dont know where to start. i know the basic, basic things i need. But i dont know how to put it all together. if anyone wants to help, my AIM is: detroitsux69

  4. #4
    Join Date
    Feb 2004
    ok, well how much java do you know? Do you know how to use event handlers? Do you know how to make an applet as opposed to an application? Use a pen and paper to write down a model of whats going to be in the applet, and how it will all interact. Work out what the result of pressing the buttons should be, and think of ways to achieve that. The event handlers will listen for the buttons being pressed, and then run the code that makes that happen. The GUI should be relatively easy to design as long as you have an idea in your head of what you want it to look like.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.