"ID Card Generator System": A Micro Project Report On
"ID Card Generator System": A Micro Project Report On
Khed Solapur-413255
2023-24
AFFILIATED TO
M.S.B.T.E.
Evolution sheet for Micro Project
CO 1
CO 2
CO 3
CO 4
CO 5
08 Sanskar Donagre
Name and
MS. Birajdar A.M
Signature of
faculty
SVP’s Swami Vivekanand Institute of Technology(Polytechnic),
Solapur
.
CERTIFICATE
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
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.
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.
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 -
inputPanel.add(insertPhotoButton);
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";
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);
// 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();
// 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);
}
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 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