0% found this document useful (0 votes)
13 views14 pages

AJP Demo Microprojecg

Uploaded by

vinitsahare963
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views14 pages

AJP Demo Microprojecg

Uploaded by

vinitsahare963
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

MICRO-PROJECT REPORT ON

“Currency Convertor Using Swing”


In partial fulfilment of Diploma in Computer Engineering
(Fifth Semester)

In the subject of
Advanced Java Programming ( 22517 )

Submitted By
Rakesh S. Raut
Vinit D. Sahare
Soham S.Bijwar

Submitted To

Maharashtra State Board of Technical Education, Mumbai

Under the Guidance of


Mr. P. U. Malve

Lecturer In Department of Computer


Engineering Government Polytechnic, Arvi Dist.-
Wardha (2024-25)
Government Polytechnic, Arvi
Department of Computer Engineering

Certificate

This is to certify, that student whose name is mention below of Fifth Semester of
Diploma in Computer Engineering has satisfactorily completed the Micro- project
entitled “Currency Convertor Using AWT.” in Advanced Java Programming (22517) of
the academic year 2023-24 as prescribed in MSBTE curriculum.

Roll Number Name of Student Enrollment No.


07 Rakesh S.Raut 2201320080
08 Vinit D.Sahare 2201320081
19 Soham S.Bijwar 2201320233

Subject Teacher Head of the Department Principal


Mr. P. U. Malve Dr. M. A. Ali Dr. M. A. Ali

Place:
Arvi Date:
Declaration

I under signed hereby declare that the micro-project report entitled “Currency Convertor
Using AWT”. I further declare that contents of this report are properly citied and well
acknowledge. This present report is not submitted to any other examination of this or
any other institute for the award of any diploma.

Name of Student Signature

Rakesh S. Raut

Vinit D. Sahare

Soham S.Bijwar

Place:
Arvi Date:
Part - A : Project Proposal
Currency Convertor Using AWT

 Brief Introduction:

Swing is a part of the JFC (Java Foundation Classes). Building Graphical User
Interface in Java requires the use of Swings. Swing Framework contains a large set of
components which allow a high level of customization and provide rich functionalities,
and is used to create window-based applications. Java swing components are
lightweight, platform-independent, provide powerful components like tables, scroll
panels, buttons, list, colour chooser, etc.
In this article, we’ll see how to make a currency converter which includes
conversion between INR and Dollar. Two text fields are implemented with the labels
Rupees and Dollar.
The Park Assist Manager also features user-friendly interfaces that allow both
operators and drivers to access crucial information effortlessly. For operators, it
provides comprehensive insights into parking patterns, occupancy rates, and revenue
tracking, enabling informed decision-making and strategic planning. For drivers, the
system offers a seamless experience through mobile app integration, guiding them
directly to available spots and minimizing time spent searching for parking.
Additionally, the solution can be easily scaled and customized to fit the specific needs
of different microproject environments, making it a versatile tool for improving urban
mobility and enhancing overall parking efficiency.

Aim of Micro Project : Currency Convertor Using AWT

 Intended Course Outcomes

C.O. a) Develop program using GUI framework (AWT and Swing).


C.O. b) Handle events of AWT and Swing Components.
C.O. c) Develop Java Programs to handle events in Java Programming.

 Literature Review

In the realm of Java programming, AWT (Abstract Window Toolkit) and Swing components have
played pivotal roles in shaping the graphical user interface landscape. AWT, introduced in the early
days of Java, provided a simple way to create graphical interfaces but had limitations in terms of
flexibility and customization. The advent of Swing, an extension of AWT, revolutionized GUI
development in Java by offering a rich set of customizable, lightweight components. These
advancements paved the way for the creation of diverse applications, ranging from basic tools to
complex software systems. Previous works in the field have showcased the versatility of AWT and
Swing, with developers leveraging these technologies to build intuitive interfaces for applications such
as calculators. Researchers and developers have explored various design patterns, usability principles,
and coding techniques to optimize the user experience when crafting GUI applications with AWT and
Swing components.
Examining previous case studies, it becomes evident that the design of a Café Management using
AWT and Swing components requires a deep understanding of both technologies. Developers have
delved into the intricacies of event handling, layout management, and component customization
to create
calculators that are not only functional but also aesthetically pleasing. These studies have highlighted
the importance of responsive design, error handling, and user feedback mechanisms in calculator
applications. By analyzing these past endeavors, a foundation is established for the current study,
providing valuable insights into best practices and potential challenges faced by developers working
on similar projects.

AWT and Swing in the rapidly evolving landscape of GUI development. Despite the emergence of
modern frameworks and libraries, the simplicity, reliability, and ease of use offered by AWT and
Swing continue to attract developers, especially in educational contexts and smaller-scale applications.
Studies have also explored the integration of AWT and Swing with other Java technologies, such as
servlets and databases, showcasing the versatility of these tools in building more complex and
interconnected systems. Additionally, the literature underscores the importance of user-centered
design principles when developing calculators and similar applications. User feedback, ergonomic
considerations, and accessibility features have been focal points in the research, emphasizing the
significance of creating interfaces that cater to diverse user needs and preferences. This body of
knowledge provides a solid foundation for the current study, guiding the design and implementation of
an effective, user-friendly Park Assist Manager using AWT and Swing components.

 Proposed Methodology:

 First, we need to create a frame using JFrame.


 Then, create two labels, two textfields and three buttons(the first button for rupees and
the second button is for the dollar) using JLabel, JTextField and JButton.
 Name these components accordingly and set their bounds.
 Now, in order to perform the conversion on button click, we need to add Event Handlers.
In this case, we will add ActionListener to perform an action method known as
actionPerformed in which first we need to get the values from the text fields which is
default as a “string”.
 So, in order to perform mathematical operations, we need to convert them into double
data type using Double.parseDouble(Object.getText()) and again converting from double
to string to place the final value in the other text field using String.valueOf(object).
 Finally, for changing the values, we use Object.setText(object), the second object is for
selecting which field we want to replace.
 .

 Resources Required

Sr. No. Name of Resource Specifications Quantity

Computer (intel i5 10th gen), RAM 8GB


1 Computer System 1

2 Operating system Windows 10 1


3 IDE VS Code 1
 Action Plan

Name of
Sr. No. Details of Activity Planned Start Planned Finish Responsible Team
Date date Members

Discussion and Finalization of


1. the Project Title All

All
2. Preparation of Abstracts
All
3. Literature Review
All
4. Collection of Data
All
5. Discussion and Outline of
Content
All
6. Rough Writing of the Projects
Contents
All
7. Editing and Proof Reading of
the Contents

All
8. Final Completion of the Project

 Group Members

Roll No. Enrollment No. Name Signature


07 2201320080 Rakesh Sudhakarrao Raut
08 2201320081 Vinit Dattaji Sahare
19 2201320233 Soham Shrikant Bijwar
Part- B: Microproject Report

1. Rationale

Currency Convertor Using AWT and Swing components in Java offers a straightforward
and platform-independent solution. AWT provides fundamental building blocks, while Swing extends
capabilities, enabling the creation of intuitive user interfaces. These components simplify the
development process, making it accessible to beginners, and their ease of use, coupled with robust
event handling and layout management, ensures a seamless user experience. The rich set of features,
extensive documentation, community support, and integration with Java IDEs make AWT and Swing a
rational choice for building basic calculators and similar graphical applications.

AWT and Swing components are a popular choice for designing Cafe Management systems
in Java due to their user-friendly nature and wide adoption in the industry. These components offer a
comprehensive set of tools for building graphical user interfaces, making it relatively easy for
developers to create visually appealing and interactive applications. They also provide platform
independence, ensuring that the application works seamlessly across various operating systems.

The rich set of features in AWT and Swing includes a variety of widgets, layout managers,
and event handling mechanisms, which collectively simplify the development process. This is
particularly advantageous for beginners and seasoned developers alike, as it allows for the creation of
intuitive and responsive user interfaces without the need for extensive low-level coding. In summary,
AWT and Swing empower developers to deliver consistent and user-friendly cafe management
systems with a focus on aesthetics, functionality, and cross-platform compatibility.

2. Aim of Micro Project : Currency Convertor Using AWT

3. Course Outcomes Addressed:

C.O. a) Develop program using GUI framework (AWT and Swing).


C.O. b) Handle events of AWT and Swing Components.
C.O. c) Develop Java Programs to handle events in Java Programming.

4. Literature Review:

In the realm of Java programming, AWT (Abstract Window Toolkit) and Swing components have
played pivotal roles in shaping the graphical user interface landscape. AWT, introduced in the early
days of Java, provided a simple way to create graphical interfaces but had limitations in terms of
flexibility and customization. The advent of Swing, an extension of AWT, revolutionized GUI
development in Java by offering a rich set of customizable, lightweight components. These
advancements paved the way for the creation of diverse applications, ranging from basic tools to
complex software systems. Previous works in the field have showcased the versatility of AWT and
Swing, with developers leveraging these technologies to build intuitive interfaces for applications such
as calculators. Researchers and developers have explored various design patterns, usability principles,
and coding techniques to optimize the user experience when crafting GUI applications with AWT and
Swing components.
Examining previous case studies, it becomes evident that the design of a Café Management using
AWT and Swing components requires a deep understanding of both technologies. Developers have
delved into the intricacies of event handling, layout management, and component customization to
create calculators that are not only functional but also aesthetically pleasing. These studies have
highlighted the importance of responsive design, error handling, and user feedback mechanisms in
calculator applications. By analyzing these past endeavors, a foundation is established for the current
study, providing valuable insights into best practices and potential challenges faced by developers
working on similar projects.

AWT and Swing in the rapidly evolving landscape of GUI development. Despite the emergence of
modern frameworks and libraries, the simplicity, reliability, and ease of use offered by AWT and
Swing continue to attract developers, especially in educational contexts and smaller-scale applications.
Studies have also explored the integration of AWT and Swing with other Java technologies, such as
servlets and databases, showcasing the versatility of these tools in building more complex and
interconnected systems. Additionally, the literature underscores the importance of user-centered
design principles when developing calculators and similar applications. User feedback, ergonomic
considerations, and accessibility features have been focal points in the research, emphasizing the
significance of creating interfaces that cater to diverse user needs and preferences. This body of
knowledge provides a solid foundation for the current study, guiding the design and implementation of
an effective, user-friendly Park Assist Manager using AWT and Swing components.

5. Actual Procedure Followed

1. Environment Setup: Install Java Development Kit (JDK) and an Integrated


Development Environment (IDE).

2. GUI Component Creation: Use AWT and Swing classes to create buttons, text fields,
and labels.

3. Event Handling: Implement action listeners to respond to user interactions like button clicks.

4. Layout Management: Utilize layout managers (e.g., BorderLayout, GridLayout)


for organizing components.

5. User Input and Output: Capture user input from buttons, process calculations, and
display results in text fields.

6. Testing and Debugging: Thoroughly test the calculator, identify and fix errors
through debugging.

7. Refinement and Optimization: Optimize the code for efficiency, eliminate redundancies,
and improve readability.

8. Documentation: Add comments and documentation to explain code logic and functionality.

9. Deployment: Deploy the application as a standalone executable or integrate it into larger


Java programs.
6. Actual Resources Used

Sr. No. Name of Resource Specifications Quantity


th
Computer (intel i5 10
1 Computer System gen), RAM 8GB 1

2 Operating system Windows 10 1

3 IDE VS Code 1

Java Code:

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class GFG {

// Function to convert from rupee


// to the dollar and vice-versa
// using Java Swing
public static void converter()
{

// Creating a new frame using JFrame


JFrame f = new JFrame("CONVERTER");

// Creating two labels


JLabel l1, l2;

// Creating two text fields.


// One for rupee and one for
// the dollar
JTextField t1, t2;

// Creating three buttons


JButton b1, b2, b3;

// Naming the labels and setting


// the bounds for the labels
l1 = new JLabel("Rupees:");
l1.setBounds(20, 40, 50, 30);
l2 = new JLabel("Dollars:");
l2.setBounds(170, 40, 60, 30);

// Initializing the text fields with


// 0 by default and setting the
// bounds for the text fields
t1 = new JTextField("0");
t1.setBounds(80, 40, 50, 30);
t2 = new JTextField("0");
t2.setBounds(240, 40, 120, 30);

// Creating a button for INR,


// one button for the dollar
// and one button to close
// and setting the bounds
b1 = new JButton("INR");
b1.setBounds(50, 80, 60, 15);
b2 = new JButton("Dollar");
b2.setBounds(190, 80, 90, 15);
b3 = new JButton("close");
b3.setBounds(150, 150, 90, 30);

// Adding action listener


b1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
// Converting to double
double d
= Double.parseDouble(t1.getText());

// Converting rupees to dollars


double d1 = (d / 65.25);

// Getting the string value of the


// calculated value
String str1 = String.valueOf(d1);

// Placing it in the text box


t2.setText(str1);
}
});

// Adding action listener


b2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
// Converting to double
double d2
= Double.parseDouble(t2.getText());

// converting Dollars to rupees


double d3 = (d2 * 65.25);

// Getting the string value of the


// calculated value
String str2 = String.valueOf(d3);

// Placing it in the text box


t1.setText(str2);

}
});

// Action listener to close the form


b3.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
f.dispose();
}
});

// Default method for closing the frame


f.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e)
{
System.exit(0);
}
});

// Adding the created objects


// to the form
f.add(l1);
f.add(t1);
f.add(l2);
f.add(t2);
f.add(b1);
f.add(b2);
f.add(b3);

f.setLayout(null);
f.setSize(400, 300);
f.setVisible(true);
}

// Driver code
public static void main(String args[])
{
converter();
}
}

Output:-
7. Skill Developed:

• Solving complex problems by breaking them into parts and steps.


• Planning and time management.
• Refined understanding through discussion and explanation.
• Developed stronger communication skills.
• Delegated roles and responsibilities.

8. Conclusion:

The Park Assist Manager microproject serves as a comprehensive solution for efficiently managing
parking spaces. With its user-friendly interface, the application simplifies the parking process by
allowing users to easily park and unpark vehicles, check availability, and view parked vehicles.
Furthermore, its scalable architecture opens the door for future enhancements, such as payment
integration and advanced reporting tools.
Overall, this project not only demonstrates proficiency in Java Swing for GUI development but also
highlights a strong understanding of user needs, making it a practical and effective solution for parking
management challenges.

9. References:

• https://www.geeksforgeeks.org/java-program-to-convert-currency-using-awt/
• https://stackoverflow.com/questions/16365794/java-currency-converter-gui
• https://techvidvan.com/tutorials/java-currency-converter-project/
• https://www.scaler.com/topics/currency-converter-java-project/
• https://codewithcurious.com/projects/currency-converter-in-java-using-swing/

You might also like