https://github.com/afa-farkhod/usd-krw-currency-converter
Desktop app built on eclipse window builder, to calculate USD-to-KRW and KRW-to-USD currency
https://github.com/afa-farkhod/usd-krw-currency-converter
desktop-application eclipse-ide java swing-gui windowbuilder
Last synced: 2 months ago
JSON representation
Desktop app built on eclipse window builder, to calculate USD-to-KRW and KRW-to-USD currency
- Host: GitHub
- URL: https://github.com/afa-farkhod/usd-krw-currency-converter
- Owner: afa-farkhod
- License: gpl-3.0
- Created: 2023-03-12T09:09:06.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-02T02:07:24.000Z (almost 2 years ago)
- Last Synced: 2025-02-02T01:13:29.091Z (4 months ago)
- Topics: desktop-application, eclipse-ide, java, swing-gui, windowbuilder
- Language: Java
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# USD-KRW-Currency-Converter
Desktop app built on eclipse window builder, to calculate USD-to-KRW and KRW-to-USD currency- Main application view looks as following:
![]()
- When we enter the general dollar to won conversion rate based on real time, then enter the amount in case of dollar to won conversion, and press the button `USD-To-KRW`:
![]()
- And in the case of `KRW-To-USD` button, again enter the amount to convert from won to dollar, then press the related button:
![]()
## [Implementation](https://github.com/af4092/USD-KRW-Currency-Converter/blob/main/DollarToWonConverter/src/Main.java)
- Code represents a simple currency converter application using `Java Swing` for the graphical user interface (GUI). Here's a general explanation of the code:
- The code includes the necessary import statements for the required classes and packages.
- The `Converter` class extends the `JFrame` class, which represents the main window of the application.
- Inside the `Converter` class, there are various components defined as private member variables, including the content pane, text fields for currency rate and amount, a label for displaying the converted result, and strings for storing the currency rate and amount.
- The constructor of the `Converter` class sets up the GUI window. It configures the frame title, icon image, size, and close operation. It creates a content pane, sets its layout to null, and adds various components to it (labels, text fields, buttons, and a result label).
- Two buttons are created: `USD-To-KRW` and `KRW-To-USD`. These buttons have associated action listeners that respond when they are clicked. The action listeners retrieve the currency rate and amount entered by the user, create an instance of the `ConverterMethod` class, and call the appropriate methods to perform the currency conversion. The result is then displayed in the `lbDisplay` label.
- The `ConverterMethod` class is not provided in the given code, so its implementation is missing. However, it can be assumed that this class handles the actual currency conversion calculations.
- The `Main` class contains the `main` method, which is the entry point of the program. It creates an instance of the `Converter` class and makes it visible by invoking the `setVisible(true)` method.