AJP Microproject
AJP Microproject
AJP Microproject
A PROJECT REPORT
Submitted By:
Student Name
Sr. No. Roll No.
1
AJP MICROPROJECT
CERTIFICATE
Student Name
Sr. No. Roll No.
2
AJP MICROPROJECT
4.0 Action Plan (Sequence and time required for major activity)
Name of
Sr. Planned Start Planned
Details of activity Responsible
No. date Finish date
Team Members
5.0 Resources Required (major resources such as raw material, some machining facility,
software etc.)
Sr. Name of
No. Resource/material Specifications Qty Remarks
1 MS-Word 2010 1
2 Laptop RYZEN 5@345GH 8GB Ram 1
3 IDE intellij 1
3
AJP MICROPROJECT
Annexure – II
4
AJP MICROPROJECT
ACKNOWLEDGMENT
I wish to express our profound and sincere gratitude to our guide.
Thank You…..!!!!
5
AJP MICROPROJECT
Introduction
Swing is apart of the JFC(Java Foundation Classes) . Building Graphical
User Interface in java requires the use of Swing.Swing Freamwork
continsca largeset of components which allow a high level of customization
and provide rich functionalities and is used to used creat window-based
application. Java swing components are lightweight, platformindependet,
provide powerful components like tables, scroll panels, button, list, color
chooser, ect.
In this article, we’ll see how to make a currency convertar which includes
conversion berween INR and Dollar. Tow textfield are implemented with the
lable Ruppes and Doller.
6
AJP MICROPROJECT
Abstract :
Approch:
Program Code :
package com.AJP;
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
public class CFG
{
public static void Converter()
{
JFrame f=new JFrame("CONVERTER");
JLabel l1,l2;
JTextField t1,t2;
JButton b1,b2,b3;
l1 = new JLabel("Rupees");
l1.setBounds(20,40,60,30); //20,40,60,30
l2 = new JLabel("Dollars");
l2.setBounds(170,40,60,30); //170,40,60,30
7
AJP MICROPROJECT
t1 = new JTextField("0");
t1.setBounds(80,40,50,30); //80,40,50,30
t2 = new JTextField("0");
t2.setBounds(240,40,50,30); //240,40,50,30
b1 = new JButton("INR");
b1.setBounds(50,80,80,15); //50,80,60,15
b2 = new JButton("Dollar");
b2.setBounds(190,80,75,15); //190,80,60,15
b3 = new JButton("close");
b3.setBounds(130,130,75,30); //150,150,60,30
b1.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
double d =Double.parseDouble(t1.getText());
double d1 = (d / 75.13);
String str1 = String.valueOf(d1);
t2.setText(str1);
}
});
b2.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
double d2 = Double.parseDouble(t2.getText());
double d3 = (d2 * 75.13);
String str2 = String.valueOf(d3);
t1.setText(str2);
}
});
b3.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
f.dispose();
}
});
f.addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
System.exit(0);
}
});
f.add(l1);
f.add(t1);
f.add(l2);
f.add(t2);
8
AJP MICROPROJECT
f.add(b1);
f.add(b2);
f.add(b3);
f.setLayout(null);
f.setSize(400,300);
f.setVisible(true);
}
Output:
1.The Window displayed on running the program:
9
AJP MICROPROJECT
10
AJP MICROPROJECT
Conclusion:
The project involves a good knowledge of java
programming language. The developer will be able to
implement it easily as it doesn’t require any database and the
sourse code is also available for free. This project is very
affordable and useful for the people who are in
business,shares or finance. As it is a web-based program,it
will update automatically.
Reference:-
www.geeksforgeeks.com
www.javapoint.com
Thank You!!!!!....
11