-
Notifications
You must be signed in to change notification settings - Fork 5
Update TemperatureConverter.java #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This code creates a simple GUI with a text field for input and two buttons for conversion. When you click the “To Celsius” button, it converts the temperature from Fahrenheit to Celsius. When you click the “To Fahrenheit” button, it converts the temperature from Celsius to Fahrenheit. Please note that this is a basic example and does not include error handling for non-numeric or out-of-range input. You may want to add those in a production environment.
|
@adityaaa009 First, mention the and want assignment request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR transforms a basic TemperatureConverter class into a functional GUI application using Java Swing. The changes implement a complete temperature conversion interface with text input and conversion buttons.
- Renamed class from TemperatureConverter to TempConverter and extended JFrame
- Added GUI components including text field and conversion buttons
- Implemented temperature conversion logic for both Fahrenheit-to-Celsius and Celsius-to-Fahrenheit
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This code creates a simple GUI with a text field for input and two buttons for conversion. When you click the “To Celsius” button, it converts the temperature from Fahrenheit to Celsius. When you click the “To Fahrenheit” button, it converts the temperature from Celsius to Fahrenheit. Please note that this is a basic example and does not include error handling for non-numeric or out-of-range input. You may want to add those in a production environment.