0% found this document useful (0 votes)
26 views13 pages

"ID Card Generator System": A Micro Project Report On

The document is a micro project report on an 'ID Card Generator System' submitted by Sanskar Shashikant Dongare for a diploma in computer engineering. It outlines the project's aims, methodology, resources used, and the skills developed through the project, which include advanced Java programming concepts such as GUI development and event handling. The report also includes a code snippet for the ID card generator application and an evaluation sheet for the project.
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)
26 views13 pages

"ID Card Generator System": A Micro Project Report On

The document is a micro project report on an 'ID Card Generator System' submitted by Sanskar Shashikant Dongare for a diploma in computer engineering. It outlines the project's aims, methodology, resources used, and the skills developed through the project, which include advanced Java programming concepts such as GUI development and event handling. The report also includes a code snippet for the ID card generator application and an evaluation sheet for the project.
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/ 13

A

Micro project report On

“ID Card Generator System”

SUBMITTED TO M.S.B.T.E., Mumbai

For the Award of


DIPLOMA IN COMPUTER ENGINEERING BY

Roll no Name of Student Enrollment No


08 Sanskar Shashikant Dongare 2212140102

UNDER THE GUIDANCE OF

Ms. Birajdar A.M


DEPARTMENT OF COMPUTER ENGINEERING

SVP’s Swami Vivekanand Institute of Technology(Poly),Solapur

Khed Solapur-413255

2023-24
AFFILIATED TO

M.S.B.T.E.
Evolution sheet for Micro Project

Academic Year:- 2023-24 Name of Faculty:- MS .Waghamare P.U


Course:- Computer Engineering Course code:- CO5I
Subject:- Advance Java Subject Code:- 22414
Semester:- 5th Scheme:- I

Title of Project:- “ID Card Generator System”

COs addressed by the Micro Project:

CO 1
CO 2
CO 3
CO 4
CO 5

Comments/Suggestions about team work/leadership/inter-personal communication (if any)

Marks out of 6 Marks out of 4 Total


for for performance mars
Roll No Name of students performance in in oral/ out of
group activity Presentation 10

08 Sanskar Donagre

Name and
MS. Birajdar A.M
Signature of
faculty
SVP’s Swami Vivekanand Institute of Technology(Polytechnic),
Solapur
.

CERTIFICATE

This is to certify that the Project report entitled


Submitted by

Roll no Name of Student Enrollment no


08 Sanskar Shashikant Dongare 2212140102

is a bonafide work carried out by above students, under the guidance of Ms.Waghmare P.S .. and it
is submitted towards the fulfillment of requirement of MSBTE, Mumbai for the award of Diploma in
Computer Engineering at SVP’s COE (Polytechnic), Solapur during the academic year 2023-2024.

(Ms.Birajdar A.M)

Guide

(Ms.Waghmare P.S .) (mrs.Bhosale K.S)

HOD Principal

Place: Solapur

Date:
Micro Project Proposal
“ID Card Generator System”
1.0 Aims/Benefits of the Micro-Project:
To learn/understand the concepts of the Advanced Java programming and apply at the places
required. The main aim of this micro project is to understand the Advanced Java code logic
designed for performing ID Card Generator system.

2.0 Course Outcomes Addressed:


1. Develop programs using GUI Framework (AWT and Swing).
2. Handel events of AWT and Swing components.
3. Develop a Java program using networking concepts.
4. Develop a Java program using Servlets.
3.0 Proposed Methodology:
After choosing the topic for our micro-project ,we decided to collect some information related
to our project topic and do some research on it. Based on that information we would be
developing some logic for carrying out different various functions related to ID Card
Generator system.

4.0 Resources Required:

SrNo Name of Resource/Material Specification Qty. Remarks


1 Hardware Resource Intel i3,2GB RAM 1 -
2 Software Resource Turbo C/C++ 1 -
3 Any Other Resource Internet 1 -
Micro Project Report

1.0 Rational :
The basic application for Generating ID card i.e. in that user can generate his/her ID card.
This application simply generates the ID card of any person by taking some from user.

2.0 Aims/Benefits of the Micro-Project:


To learn/understand the concepts of the Advanced Java programming i.e. the concepts of
GUI, Swings, Interfaces and Components etc., The main aim of this micro project is to
understand the Advanced Java code logic designed for performing ID Card Generator
system.

3.0 Course Outcomes Achieved:


1. Develop programs using GUI Framework (AWT and Swing).
2. Handel events of AWT and Swing components.
3. Develop a Java program using networking concepts.
4. Develop a Java program using Servlets.
4.0 Literature Review:
After choosing the topic for our micro-project ,we decided to collect some information related
to our project topic and do some research on it. Based on that information we would be
developing some logic for carrying out different various functions related to ID Card Generator
system.
5.0 Actual Methodology Followed :

After the topic for our project was selected, we segregated the work load as follows

1. Researching and collecting the required information was done by our team members Tanishka ,
Divya , Devang and Saloni.
2. Arrangement of this work in appropriate manner and cross checking of the was done by Devang
and Tanishka.
3. Compiling this work and formatting of the report was done by our team members Divya and
Saloni.
6.0Actual Resources Used:

Sr
Name of Resource/Material Specification Qty. Remarks
No
1 Hardware Resource Intel i3,2GB RAM 1 -
2 Software Resource JDK 1.6 1 -
3 Any Other Resource Internet 1 -

7.0 CODE AND OUTPUT:


 Program Code:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
public class IDCardGenerator extends JFrame implements ActionListener {
private JTextField idField, nameField, classField, addressField, phoneField;
private JLabel idLabel, nameLabel, classLabel, addressLabel, phoneLabel;
private JButton generateButton, insertPhotoButton;
private BufferedImage photo;
private String collegeName = ""; // Initialize college name as empty
public IDCardGenerator() {
setTitle("ID Card Generator");
setSize(400, 500);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLayout(new BorderLayout());
JPanel inputPanel = new JPanel();
inputPanel.setLayout(new GridLayout(6, 2)); idLabel =
new JLabel("ID:");
idField = new JTextField(20); nameLabel
= new JLabel("Name:");
nameField = new JTextField(20); classLabel
= new JLabel("Class:");
classField = new JTextField(20);
addressLabel = new JLabel("Address:");
addressField = new JTextField(20);
phoneLabel = new JLabel("Phone:");
phoneField = new JTextField(20);
inputPanel.add(idLabel);
inputPanel.add(idField);
inputPanel.add(nameLabel);
inputPanel.add(nameField);
inputPanel.add(classLabel);
inputPanel.add(classField);
inputPanel.add(addressLabel);
inputPanel.add(addressField);
inputPanel.add(phoneLabel);
inputPanel.add(phoneField);

insertPhotoButton = new JButton("Insert Photo");


insertPhotoButton.addActionListener(this);

inputPanel.add(insertPhotoButton);

generateButton = new JButton("Generate ID Card");


generateButton.addActionListener(this);
generateButton.setPreferredSize(new Dimension(150, 30)); // Set the button size

JPanel buttonPanel = new JPanel();


buttonPanel.add(generateButton);

add(inputPanel, BorderLayout.NORTH);
add(buttonPanel, BorderLayout.CENTER);

setVisible(true);
}
public void actionPerformed(ActionEvent e) {
if (e.getSource() == insertPhotoButton) {
JFileChooser fileChooser = new JFileChooser();
int returnValue = fileChooser.showOpenDialog(null);
if (returnValue == JFileChooser.APPROVE_OPTION) {
try {
File = fileChooser.getSelectedFile();
photo = ImageIO.read(file); } catch
(IOException ex)
{ ex.printStackTrace();
}
}
} else if (e.getSource() == generateButton) {
String id = idField.getText();
String name = nameField.getText();
String className = classField.getText();
String address = addressField.getText();
String phone = phoneField.getText();

// Store the college name, or you can set it directly in the code
collegeName = "College Name";

// Create and display the ID card


generateIDCard(id, name, className, address, phone);
}
}

private void generateIDCard(String id, String name, String className, String address, String
phone) {
JFrame idCardFrame = new JFrame("ID Card");
idCardFrame.setSize(300, 400);
idCardFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

JPanel idCardPanel = new JPanel();


idCardPanel.setLayout(new BoxLayout(idCardPanel, BoxLayout.Y_AXIS)); // Center-align
content

JLabel collegeNameLabel = new JLabel("Sandip Foundation");


collegeNameLabel.setFont(new Font("SansSerif", Font.BOLD, 18));
collegeNameLabel.setAlignmentX(Component.CENTER_ALIGNMENT); // Center-align
college name
idCardPanel.add(collegeNameLabel);

// Display the photo on the ID card at the top with a specific size
if (photo != null) {
BufferedImage scaledPhoto = new BufferedImage(120, 150,
BufferedImage.TYPE_INT_ARGB);
Graphics2D g = scaledPhoto.createGraphics();
g.drawImage(photo, 0, 0, 120, 150, null);
g.dispose();

JLabel photoOnID = new JLabel(new ImageIcon(scaledPhoto));


photoOnID.setAlignmentX(Component.CENTER_ALIGNMENT); // Center-align the
image
idCardPanel.add(photoOnID);
}

JLabel idLabel = new JLabel("ID: " + id);


JLabel nameLabel = new JLabel("Name: " + name);
JLabel classLabel = new JLabel("Class: " + className);

JLabel addressLabel = new JLabel("Address: " + address);


JLabel phoneLabel = new JLabel("Phone: " + phone);

// Center-align text
idLabel.setAlignmentX(Component.CENTER_ALIGNMENT);
nameLabel.setAlignmentX(Component.CENTER_ALIGNMENT);
classLabel.setAlignmentX(Component.CENTER_ALIGNMENT);
addressLabel.setAlignmentX(Component.CENTER_ALIGNMENT);
phoneLabel.setAlignmentX(Component.CENTER_ALIGNMENT);

idCardPanel.add(idLabel);
idCardPanel.add(nameLabel);
idCardPanel.add(classLabel);
idCardPanel.add(addressLabel);
idCardPanel.add(phoneLabel);

idCardFrame.add(idCardPanel);
idCardFrame.setVisible(true);
}

public static void main(String[] args) {


SwingUtilities.invokeLater(() -> new IDCardGenerator());
}
}
• Output of The Above Program:

6.0 Skill Developed:

• Develop advanced java program using GUI and Swings.


• Understand components in advanced java programming.
• Develop program using applet and servlet.
• Develop program for handling EventListeners.
• Develop program using Database.
• Develop java program using networking concepts.
 Concepts that we used in Advanced Java :

Components:
All the elements like the button, text fields, scroll bars, etc. are called components. In Java AWT, there are classes
for each component as shown in above diagram. In order to place every component in a particular position on a
screen, we need to add them to a container.

Container:
The Container is a component in AWT that can contain another components like buttons, textfields, labels etc. The
classes that extends Container class are known as container such as Frame

Java AWT Label:


The object of the Label class is a component for placing text in a container. It is used to
display a single line of read only text. The text can be changed by a programmer but a user
cannot edit it directly.

Java AWT Button:


A button is basically a control component with a label that generates an event when pushed.
The Button class is used to create a labeled button that has platform independent
implementation. The application result in some action when the button is pushed.

Java JLabel:
The object of JLabel class is a component for placing text in a container. It is used to
display a single line of read only text. The text can be changed by an application but a user
cannot edit it directly. It inherits JComponent class.

Java JButton:
The JButton class is used to create a labeled button that has platform independent
implementation. The application result in some action when the button is pushed. It
inherits AbstractButton class.

Java JPanel:
The JPanel is a simplest container class. It provides space in which an application can attach
any other component. It inherits the JComponents class.

Java JTextField:
The object of a JTextField class is a text component that allows the editing of a single line
text. It inherits JTextComponent class.
Micro Project Evaluation Sheet
Name of Student: Sanskar Shashikant Dongare Enrollment No:
2212140102
Name of Program: Computer Engineering Semester: fifth

Course Title: Advanced Java Programing Course Code: 22517

Title of Micro Project: ID card Generator System

Course Outcomes Achieved:

1.Develop programs using GUI Framework (AWT and Swing).


2.Handel events of AWT and Swing components.
3.Develop a Java program using networking concepts.
4.Develop a Java program using Servlets.
Comments/Suggestions about Teamwork/Leadership/Inter-personal Communication (if any)

You might also like