Write a java gui application to do temperature conversions

Assignment Help JAVA Programming
Reference no: EM13811702

Write a Java GUI application to do temperature conversions between Celcius, Fahranheit, and Kelvin. The GUI display should look something like the following:

 

Your program must meet the following requirements:

 

1. Do not use any of the GUI editing capabilities of Eclipse for this assignment. Do all the GUI layout work based on what you have learned in class in the last 2 weeks.

 

2. The GUI and event handling setup should be done in the constructor of your GUI class or in private methods called from the constructor.

 

3. The display must have a label and JTextField where the user inputs a value which must appear in the upperpart of the frame as shown above.

 

4. There should be a set of 3 radio buttons which indicate the input scale of the value to be converted. The 3 input scale buttons must be vertically aligned on the left side of the display as shown above.

 

5. There should be a set of 3 radio buttons which indicate the output scale to be converted to. The 3 output scale buttons must be vertically aligned and appear on the right side of the display as shown above.

 

6. Event handling must be setup so that selection of any input or output button causes an eventwhich triggers the event handling code to determine which of 9 possible conversions is needed.

 

7. Event handling must also respond to the user hitting the enter key in the input textfield! For this event, the event handling code must also determine which conversion is needed based on which buttons are selected.

 

8. Display the conversion result in an output text field or in a JLabel which appears in the bottom part of the display as shown above. Output the degree symbol and output scale information as shown above. You can output a degree symbol by putting the character value 176 into a formatted string.

 

9. If a radio button is clicked when there is nothing in the input textfield, the event handler must display the string "No Input" in the output textfield.

 

10. Your program must accurately convert from Fahrenheit, Celcius, Kelvin to Fahrenheit, Celcius, Kelvin. Only the selected conversion is displayed in the output textfield.

 

11. You must create a separate class which does all the temperature conversion calculations. It should have 6 static methods, one for each possible conversion. Each of the 6 methods takes an input temperature and returns the appropriate converted temperature. This class could be used in any other application where temperature conversion is needed.

 

12. When the conversion selection changes due to clicking either an input or output scale button, the output area must change to show only the new result.

 

13. HINT: For radio button events, use the ItemListener interface and use the isSelected method on the radio buttons to find out which buttons are turned on!

 

14. The output must display 2 digits after the decimal point.

Reference no: EM13811702

Questions Cloud

Income statement-revenue before fixed costs : It represents the most recent years operations, which ended yesterday. Your Supervisor in the controller’s office has just handed you a memorandum asking for written responses to the following questions: If sales should increase by 25%, by what perce..
What occupations did or do you plan to hold as an adult : When you were a child, what occupations did or do you plan to hold as an adult? What occupation or occupations did you end up holding/ what type of jobs did you or do you do?
Identify significant elements of the constitution : Identify three significant elements of the Constitution
What are tqm and iso : What are TQM and ISO? How might TQM and ISO be used to improve an organization?
Write a java gui application to do temperature conversions : Write a Java GUI application to do temperature conversions between Celcius, Fahranheit, and Kelvin
Capital budgeting analysis on a project with estimated cost : Suppose you are running a capital budgeting analysis on a project with an estimated cost of $2 million. The project is considered similar to the existing lines of businesses for the company. Given the cash situation, the company will fund the project..
Write an essay on your short term personal financial and car : Write an essay on your short term personal financial and career goals and the tentative plan on how you will achieve them.
For initial public offerings of common stock : For initial public offerings of common stock, 2010 was a relatively slow year, with about $30.7 billion raised by the process. Relatively few of the 94 firms involved paid cash dividends. Why do you think that most chose not to pay cash dividends? Ex..
The affect of language between speakers and listeners : How does language affect the relationship between speakers and listeners

Reviews

Write a Review

JAVA Programming Questions & Answers

  1 rock-paper-scissors simplejavaproblems 1-3 are based on

1 rock-paper-scissors simple.javaproblems 1-3 are based on the rock-paper-scissors game. if you are unfamiliar with

  Write a java program in a netbeans project that reads a

write a java program in a netbeans project that reads a text file containing the names and addresses of several people

  Calculates the total annual compensation of a salesperson

Write a Java application using NetBeans Integrated Development Environment IDE that calculates the total annual compensation of a salesperson.

  Working for hypothetical insurance company

Assume that you are working for hypothetical insurance company. This company offers insurance for 4 types of vehicles: cars, trucks, motor cycles and boats. In order to keep the program manageable, we will assume that we do not make a finer distin..

  Write the logical expression in postfix notation.

Given symbols p, q, r, and s for propositions. Draw the binary tree representation of the logical expression ((p || r) && ! p ) || s) && (q || r). Write the logical expression in postfix notation.

  Creates a professorraing class

Write a program that creates a professorRaing class consisting of professor ID and three ratings. The three ratings are used to evaluate easiness, helpfullness, and clarity. In a separate implementation class, allow the user to enter the values.

  Write a java program using the java graphics

Your task for this assignment is to write a Java program using the Java Graphics class to create an example of a computer generated image. This is an opportunity for you to explore computer graphics and exercise some individual creativity.

  Java application to declare and create a vector

Write a java application that perform the following task: declare and create a vector with initial size of 10, increment of 2

  Write a program that specializes in solving the equations

Write a program that specializes in solving the equations Ax=b by Doolittle's decomposition method, where a is the HIbber matrix of arbitrary size nxn and

  Method named isallvowels that returns

Write a method named isAllVowels that returns whether a String consists entirely of vowels (a, e, i, o, or u, case-insensitively). If every character of the String is a vowel, your method should return true. If any character of the String is a non-vo..

  Create file lab7.java with a main method.

Create file Lab7.java with a main method. Inside your main method, write a segment of code which instantiates an object of the Student class (This class has been created for you in the  Student.java  file that is provided as part of this lab).

  What is relationship between hashing and digital signatures

The security advantages of using two-factor authentication, such as the integrated fingerprint reader in the more recent iPhone models, particularly to support internet services (such as online banking)

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd