Currency Converter in Java Source Code using Swing Component| GUI Application

How to Make Currency Converter in Java?

Currency Converter in Java Source Code

 

 
In this program, we will learn to create a currency converter using the java swing component.

Currency Converter in Java Source Code:

import java.awt.*;
import javax.swing.*;
import java.applet.*;
import java.awt.event.*;
class CurrencyConveter extends JFrame implements ActionListener
{
JFrame f;
JLabel l1,l2;
JTextField t1,t2;
JButton b1,b2;
JComboBox c1,c2;

CurrencyConveter()
{
f=new JFrame("Currency Conveter");

String[] currency={"US Dollar","Indian Rupee","British Pound","Euro","Chinese Yuan"};
c1=new JComboBox(currency);
c1.setSelectedIndex(0);
c1=new JComboBox(currency);
//c2.setSelctedIndex(1);

l1=new JLabel("enter your currency");
l2=new JLabel("conveted currency is:");

CheckboxGroup g=new CheckboxGroup(); 
Checkbox i=new Checkbox("India",g,true);
Checkbox u=new Checkbox("usa",g,false);
Checkbox n=new Checkbox("Nepal",g,false);
Checkbox m=new Checkbox("Malaysia",g,false);

t1=new JTextField(10);
t2=new JTextField(10);

b1=new JButton("convert");
b2=new JButton("cancel");

f.setVisible(true);
f.setSize(400,400);
f.setLayout(new FlowLayout());

f.add(l1);
f.add(t1);
f.add(b1);
f.add(b2);
f.add(l2);
f.add(t2);

b1.addActionListener(this);
b2.addActionListener(this);

}
public void actionPerformed(ActionEvent e)
{
}

public static void main(String []pp)
{
new CurrencyConveter();
}

}

COMPLETED PROJECTS:

See my more website

Pramod Kumar Yadav is from Janakpurdham, Nepal. He was born on December 23, 1996, and has one elder brother and two elder sisters. He completed his education at various schools and colleges in Nepal and completed a degree in Computer Science Engineering from MITS in Andhra Pradesh, India.He is director of Appan Bazaar Pvt.Ltd., as teacher in Tridev Eng. School , and an Educational Consultant, and he is currently working as a developer and Digital Marketer.



0 thoughts on “Currency Converter in Java Source Code using Swing Component| GUI Application”

  1. FanDuel Casino is America’s #1 online casino, delivering constant thrills with ignition game , exclusive slots like Huff N’ Huff, and actual retailer act truthful at your fingertips. Hip players stir 500 Extra Spins plus $40 in Casino Tip upstanding suited for depositing $10—plus up to $1,000 disown on first-day net losses. Line all Thrillionaires: join minute, operate your nature, and upon every flash into epic wins!

    Reply

Leave a Comment