OOPM - Report
OOPM - Report
On
Submitted By:
Internal Guide
TABLE OF CONTENTS
CHAPTER 3 IMPLEMENTATION
CHAPTER 4 RESULTS(SNAPSHOTS)
CHAPTER 5 CONCLUSION
CHAPTER 6 REFERENCES
CHAPTER 1
INTRODUCTION
In the field of software development, there is a growing need to streamline ID card creation using
programming languages that offer flexibility, robustness, and scalability. Java, with its platform
independence, object-oriented structure, and strong graphical capabilities, emerges as a fitting
choice for building such systems. While existing ID card generation systems do address the need for
automated creation and management, they often lack customization, flexibility in design, and the
ability to integrate with external databases and authentication systems seamlessly.
One challenge within this field arises when organizations require rapid generation of ID cards
without the complexity of integrating verification or authentication protocols. In these scenarios,
such as in events or temporary memberships, the focus is on formatting personal data efficiently and
clearly for use in ID badges, labels, or temporary access cards. Here, the complexity of identity
verification can be omitted, leading to a streamlined process that saves both time and resources.
This is where an ID card generator solely for data formatting can contribute meaningfully.
This project proposes a simple ID card generator developed in Java, which takes user input such as
name, cource, and roll number, etc and then formats it into a structured ID card layout without
performing any verification checks. The goal is to create an easy-to-use system that generates ID
cards with consistent formatting, making it suitable for contexts where the emphasis is on
presentation rather than security.
The hypothesis is that a Java-based ID card generator, will meet the needs of users seeking fast and
efficient ID card creation in scenarios that do not require rigorous identity authentication. To test
this, the program was developed to format user input into a standardized card layout, displaying
relevant data in a clear, organized manner.
CHAPTER 2
PROBLEM DEFINITION
CHAPTER 3
IMPLEMENTATION
Main.java:
import java.awt.*;
import java.util.*;
import java.awt.event.*;
import java.io.*;
import java.util.regex.Pattern;
import javax.imageio.ImageIO;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import java.awt.image.BufferedImage;
public Main() {
setLayout(null);
setTitle("ID Card Generator");
setSize(380, 710);
setResizable(true);
setLocationRelativeTo(null); // Center the window
add(lblHead);
add(lblSName);
add(txtSName);
add(lblCourse);
add(ListCourse);
add(lblANo);
add(txtANo);
add(lblDOB);
add(txtDOB);
add(lblAdd);
add(txtAdd);
add(lblMNo);
add(txtMNo);
add(ViewID);
add(ClearBtn);
add(UploadImage);
add(PrintCard);
ViewID.addActionListener(this);
ClearBtn.addActionListener(this);
UploadImage.addActionListener(this);
PrintCard.addActionListener(this);
ListCourse.addItemListener(this);
logo = Toolkit.getDefaultToolkit().getImage("dbit_logo.png");
profile = baseImg = Toolkit.getDefaultToolkit().getImage("profile.png");
setBackground(Color.white);
Err = false;
reqErr = false;
numErr = false;
nameErr = false;
dobErr = false;
courseTxt = "";
errStr = "";
initVector();
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent we) {
System.exit(0);
}
});
}
Err = CheckError();
if (Err) {
if (reqErr) {
g.setColor(Color.red);
g.drawString("*All Fields are Required*", 123, 235);
g.setColor(Color.white);
} else if (numErr || nameErr || dobErr) {
g.setColor(Color.red);
g.drawString("Error : " + errStr, 80, 235);
g.setColor(Color.white);
}
}
g.setFont(new Font("Bahnschrift Semi Bold", Font.BOLD, 15));
initTxt();
g.drawString("The Bombay Salesian Society", 110, 305);
g.drawString("Don Bosco Institute of Technology", 90, 325);
g.drawString("IDENTITY CARD", 135, 355);
g.drawString("Student's Name : " + snameTxt, 25, 377 + offset);
g.drawString("Course : " + courseTxt, 25, 402 + offset);
g.drawString("Roll No : " + anoTxt, 25, 427 + offset);
g.drawString("Date of Birth : " + dobTxt, 25, 452 + offset);
g.drawString("Address : " + addTxt, 25, 477 + offset);
g.drawString("Mobile No. : " + mnoTxt, 25, 502 + offset);
try {
Robot robot = new Robot();
Rectangle captureRect = new Rectangle(getX() + x, getY() + y, width, height);
BufferedImage image = robot.createScreenCapture(captureRect);
The primary aim of this project was to develop a simple ID card generator using Java that formats
user-provided data into a structured ID card. This objective has been successfully achieved. The
program enables the input of essential details, such as names, courses, and roll numbers, and effi-
ciently formats this information into a consistent, readable ID card layout.
Key findings from this project include the effective use of Java’s object-oriented capabilities to
handle user data and format it dynamically, ensuring that the output maintains a clear and organized
structure. The ID card generator is designed to be flexible and easily adaptable for different data
types and formatting requirements, making it applicable for various contexts where speed and sim-
plicity are prioritized.
The major outcome of this investigation is a functional tool that fulfills its role in environments re-
quiring rapid generation of formatted ID cards without security verification. Its significance lies in
its practicality for temporary or low-security scenarios, providing a fast, efficient solution for
presenting personal data in a clear, professional manner. The project contributes to the field by sim-
plifying ID card generation, offering a streamlined approach for scenarios where verification is not
a primary concern.
CHAPTER 6
REFERENCES
https://www.tutorialspoint.com/java
https://www.geeksforgeeks.org
https://www.w3schools.com/