Java

Currency Converter Using Java

This tutorial will teach you how to make make a Currency Converter Using Java step by step.

Paste the below the code inside the convert button.

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                         

        Double tot; 
        Double amount = Double.parseDouble(txtamount.getText());
        
        if(txtfrom.getSelectedItem().toString() == "USD" && txtto.getSelectedItem().toString() == "Srilankan Rupees")
        {
            tot = amount * 179.50;
            JOptionPane.showMessageDialog(this, "Your Amount will be " + tot.toString());
        }
       else  if(txtfrom.getSelectedItem().toString() == "USD" && txtto.getSelectedItem().toString() == "Indian Rupees")
        {
            tot = amount * 70.50;
            JOptionPane.showMessageDialog(this, "Your Amount will be " + tot.toString());
        }        
    }

i have attached the video link below. which will do this tutorials step by step.

 

admin

Recent Posts

GitHub Copilot vs Microsoft Copilot Best AI Tool to Use in 2025

GitHub is a powerful tool used by teams and developers around the globe. This guide is…

3 hours ago

Chat with Claude AI Free – Your Super-Smart AI Buddy

It's like having a super-smart buddy that is always there to help you write stories,…

4 days ago

Best Festivals UK 2025 [Free Guide Included]

The UK is known for its rich history, diverse culture, and most of all  its…

1 week ago

Bank Holidays 2025 UK – Plan Your Perfect Long Weekends

Do you have a plan for your next holiday? Being aware of the Bank Holidays within the…

1 week ago

Master Cursor AI Full Guide for Students & Creators

The world is rapidly changing of software development AI-assisted tools for coding have become the main focus. As…

1 week ago

Google Gemini AI Free AI Tool for Students & Creators

Google Gemini AI is among the top talked about developments. What exactly is it? What…

1 week ago