Learning To Code #1

in #coding4 years ago

Today I decided to make a Currency Converter using GUI - Java.✨ The program converts any amount of dollars to euros or euros to dollars. In my program 1 USD = 0.84 EUR.💸

The amount box was made with TextField.
Both ComboBoxes have two options: EUR and USD.

The hardest part for me was to make a perfect "Convert" button because I haven't done many exercises using GUI. My goal was that if you press the button then another window will pop up and tells you the answer. I achieved my goal using EventHandler.
converter.png

Do I recommend this exercise for beginners?📚 For sure! I think it's so fun and I learned so much while doing this exercise.
total.png

To step up the game next time when I try to make a converter I will try to do BTC (live price) to USD. Think it's more advanced but doable.

Sort:  

What's the source code for this? Does it take live price data?

No, it doesn't. As it was my first time making a converter I just made fixed rates. If "from" ComboBox equals EUR and "to" equals USD then total = amount * 1.19. If "to" ComboBox equals USD and "to" equals EUR then total = amount * 0.84. Next time I try to get live price data.