Question

I need help writing the code for a GUI calculator that uses 4 Radio Buttons (+....

I need help writing the code for a GUI calculator that uses 4 Radio Buttons (+. -, * , /). Only one button can be selected at a time. I also have to group the buttons for this i am importing the ToggleGroup and using that. The user also need to select one function to begin with or an "Error" message will show if they select the calculate button. I would really like to know what needs to be used to make the buttons functional to and have a result when the calculate button is selected. setOnAction seems to be of importance I am just not sure where to use it. Please note that the radio buttons have no initial selection but once a user makes a choice only one option is available.

No java.awt, javax.swing, or JOptionPane

also no extending of another class.

Thanks.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

t version tue Dec 2014 矢 printe TTome hame: private Jtabef tota Piate Telotkbor dis ount prate ト@ Pavan catatng to ,3padu脇 caarapicar compren tv to@u.de%,thiomba Pivata voiol Creata. componenti t rhbel to diplay upate tokal ) A卬,rmg a bulk discount tprivate sktie voYa center (tlarleo wee oot k g faut TodkC).gef Deea ise cy Dimen Scroe 자궁P , s at otic priate Jtert pietd texlabel :np Goldl (text Fied) a d d tlabet upthtec): textpiel d e text (tex) ant quanti ty0 quantity-Fateae·parent t tear); Pur

Add a comment
Answer #1

t version tue Dec 2014 矢 printe TTome hame: private Jtabef tota Piate Telotkbor dis ount prate ト@ Pavan catatng to ,3padu脇 caarapicar compren tv to@u.de%,thiomba Pivata voiol Creata. componenti t rhbel to diplay upate tokal ) A卬,rmg a bulk discount tprivate sktie voYa center (tlarleo wee oot k g faut TodkC).gef Deea ise cy Dimen Scroe 자궁P , s at otic priate Jtert pietd texlabel :np Goldl (text Fied) a d d tlabet upthtec): textpiel d e text (tex) ant quanti ty0 quantity-Fateae·parent t tear); Pur

Add a comment
Know the answer?
Add Answer to:
I need help writing the code for a GUI calculator that uses 4 Radio Buttons (+....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Hello I just need the code for this GUI thanks Also computer screenshot of the code...

    Hello I just need the code for this GUI thanks Also computer screenshot of the code will be helpful Attached is an incomplete Python template file. button_multi_colour_changer_Q.py Download this file and complete it to solve the following problem. Consider the GUI below (4 Labels, 4 colour Buttons and a "RESET" Button) which has been produced with a Python program using the Tkinter library. MULTI Button Colour - a X MULTI Button Colour - O X Violet Purple Blue | Green...

  • Hello I need help with this. I am trying to use JOptionpane to ask 5 questions....

    Hello I need help with this. I am trying to use JOptionpane to ask 5 questions. However I cannot get the program to do anything after an initial selection is made. Here is the assignment. Write an application that creates a quiz, which contains at least five questions about a hobby, popular music, astronomy, or any other personal interest. Each question should be a multiple choice question with at least three options. When a user answers a question correctly, display...

  • The Gui has all the right buttons, but from there i get lost. I need to...

    The Gui has all the right buttons, but from there i get lost. I need to know whats wrong with my assignment can someone please help. The code I have so far is listed below, could you please show me the errors in my code. PYTHON Create the GUI(Graphical User Interface). Use tkinter to produce a form that looks much like the following. It should have these widgets. Temperature Converter GUI Enter a temperature (Entry box)                 Convert to Fahrenheit...

  • I need this done in java plz, add comments for every single method. also, make as simple as po...

    i need this done in java plz, add comments for every single method. also, make as simple as possible. 3. Write a GUI for computing the statistics of numbers input from the user. The GUI should have a text field and a button for adding floating point numbers. Each time a number is entered have a label show the current max, min and average. Have your GUI accept numbers whether the button is pressed or the enter key is pressed...

  • I need trying to figure out how I can make create a code in Python with this exercise for I am having trouble doing so. Miles Per Gallon Calculator Write a GUI program that calculates a car's gas...

    I need trying to figure out how I can make create a code in Python with this exercise for I am having trouble doing so. Miles Per Gallon Calculator Write a GUI program that calculates a car's gas mileage. The program's window should have Entry widgets that let the user enter the number of gallons of gas the car holds, and the number of miles it can be driven on a full tank. When a Calculate MPG button is clicked,...

  • I need help creating a code for the problem in Python. Joe's Automotive Joe's Automotive performs the following routine maintenance services: Oil change-$30.00 . Lube job-$20.00 Radiator flus...

    I need help creating a code for the problem in Python. Joe's Automotive Joe's Automotive performs the following routine maintenance services: Oil change-$30.00 . Lube job-$20.00 Radiator flush-$40.00 Transmission flush-$100.00 Inspection-$35.00 Muffler replacement-$200.00 Tire rotation- $20.00 Write a GUI program with check buttons that allow the user to select any or all of these services. When the user clicks a button, the total charges should be displayed Joe's Automotive Joe's Automotive performs the following routine maintenance services: Oil change-$30.00 ....

  • I need to implement this : When the user clicks on one of the buttons, the...

    I need to implement this : When the user clicks on one of the buttons, the shape displayed on the clicked button becomes the current shape. The icon representing the current shape should outline the shape as shown below in the sample output. When a mouse is clicked on the user-defined JPanel, the current shape is drawn on the position which the mouse was pressed on. I am still new with the Mouse Listener, so any help with detail explaination...

  • need help writing code to make this gui in java To review the basics of user...

    need help writing code to make this gui in java To review the basics of user interfaces Directions Create an interface for a program that helps a group of people to calculate how much each of them owes for a restaurant meal that looks like the one below. The interface does not need to do anything in response to user clicks.

  • Java class please answe r I need correct answers, answers in the picture might be wrong...

    Java class please answe r I need correct answers, answers in the picture might be wrong thanks 17) This is a basic window that has a border around it, a title bar, and a set of buttons for minimizing maximizing, and closing the window. A) dialog box container pane D) frame 18) What is the default title for the input dialog box? A) Message B) Please Confirm c) Select an Option D) Input is an action that takes place within...

  • This is python3. Please help me out. Develop the following GUI interface to allow the user...

    This is python3. Please help me out. Develop the following GUI interface to allow the user to specify the number of rows and number of columns of cards to be shown to the user. Show default values 2 and 2 for number of rows and number of columns. The buttons "New Game" and "Turn Over" span two column-cells each. Fig 1. The GUI when the program first starts. When the user clicks the "New Game" button, the program will read...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT