A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

anonymous

  • 5 years ago

HI, AM A JAVA NOVICE AND I WOULD LIKE TO KNOW HOW I CAN DESIGN A HEXADECIMAL CALCULATOR USING THE javax.swing package. AND MANIPULATING IT TO CAHNGE COLOR F THE BACKGROUND AND THAT OF THE TEXT. THANK YOU.

  • This Question is Closed
  1. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    First of all: turn CAPS off. Secondly: SWING is used to create GUIs. Overall, I think the answer is yes.

  2. carlsmith
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Are you asking how to do a calculator that handles hexadecimals or how to change colours when using a particular Java package? I don't think people really understand the question.

  3. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    yes, this will require import java.swing.*; // for gui, layaout, borders, panels buttons etc import java.awt.*; // to handle events import java.io.* you need to make sure that your program does not crash if someone inputs something other than hexadecimals. Do you want a calculator or a converter? you might consider radio buttons to select the color, possibly menu items. Do you want your program to prompt your user for input? This is sort of a two part question. I think that it would be best to figure out the logic if the program first -- I would design a class to handle the calulations something like: class Converter{ private long input; String output; prompt user for input convert user input into data stream object method to perform calculation ( what is the algotithm you are going to use to convert base ten to 16 or does the math class have some code for that that you can reuse? are you going to use a queue or an array to store data? } just start writing some methods possibly draw a picture first (to be honest this is not a very simple assignment) after that then you can make an applet to display and run your program. Remember that you applet is going to extend from JApplet and will implement action listener you need a panel to display everything, a JTextField to get user input, and a button that reuns your program at the bare minimum. Hopethat can get you started...

  4. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    In the first phase, all i need is a shell on how the calculator will look like (interaction is not yet an issue), replacing 0-9 buttons with 0-F and the +, -, / and * with AND, OR, XOR, NOR and NAND as operators. Am sorry it wasn't clear. Thank you all.

  5. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.