Fahrenheit to Celsius Temperature Converter GUI Assignment

Write a GUI to convert Fahrenheit temperatures to Celsius temperatures and has the following appearance:

Initial Image

It must include the following features:

  • The frame title must say ‘Fahrenheit to Celsius Temperature Converter’.
  • A border layout will be used for the GUI.
  • The JLabel title of the GUI will say ‘Fahrenheit to Celsius Temperature Converter’ and be in red and will be placed in BorderLayout.NORTH.
  • A JLabel of ‘Fahrenheit temperature: ‘ will be placed in BorderLayout.WEST.
  • A JTextField will be placed in BorderLayout.CENTER and be initialized to spaces and have a width of 8.
  • A JLabel of ‘ Celsius Temperature’ will be placed in BorderLayout.EAST.
  • A JButton will be placed in BorderLayout.SOUTH and will contain ‘Convert’.

To execute the GUI, place a temperature in the JTextField and click the Convert button. The Convert button handler will then execute and calculate the Celsius temperature and display it as shown in the following image:

Final Image

The Celsius temperature will be calculated using the following formula:

C = 5.0 / 9.0 * (F – 32.0)

and displayed to one decimal place. You can use the Double.parseDouble(textField.getText() ) to get the string value from the JTextField and parse it to a double. Use temperatures that you know the answer to to test your GUI. (i.e. 212.0 and 32.0 and the value above)

Set the size of your GUI to (350, 110). This should give it the appearance as shown above. Your class that represents the GUI should extend JFrame.

Do not use the Netbeans GUI generator for this project.

Looking for solution of this Assignment?


We deliver quality original papers

Our experts write quality original papers using academic databases.  

Free revisions

We offer our clients multiple free revisions just to ensure you get what you want.

Discounted prices

All our prices are discounted which makes it affordable to you. Use code FIRST15 to get your discount

100% originality

We deliver papers that are written from scratch to deliver 100% originality. Our papers are free from plagiarism and NO similarity

On-time delivery

We will deliver your paper on time even on short notice or  short deadline, overnight essay or even an urgent essay