JAVA Mini Project
JAVA Mini Project
2024-25
Member Details:
Roll No: 151 Roll No: 152 Roll No: 153 Roll No. 154
Description:
Overview
Design a Resume Generator in Java that allows users to input their personal, educational,
and professional details through a user-friendly interface (using Java Swing or JavaFX).
The application generates and displays the formatted resume on the screen with multiple
template options to choose from. Users can preview, edit, and finalize their resume within
the application, without needing to download it. Validation and error handling ensure
correct data entry.
Installation Guide
Java Development Kit (JDK):
The Resume Generator requires the JDK (Java SE) to compile and run Java programs.
Installation:
Download the JDK from the Oracle website.
Install the JDK by following the on-screen instructions.
Set up the JAVA_HOME environment variable on your system.
Ensure that the JDK is accessible by running the following command in your terminal:
bash
java -version
You should see the installed version of Java.
Use an IDE like IntelliJ IDEA, Eclipse, or NetBeans for managing the project and writing
code.
Installation:
Download and install any of the IDEs.
Set up a new Java project in the IDE.
UCOE / COMP / 3rd Sem / Computer Graphics A.Y. 2024-25
Libraries:
If using JavaFX, ensure that the JavaFX libraries are added to your project’s build path.
If using Java Swing, no additional libraries are needed as Swing is part of the standard
Java SDK.
Hardware Requirements
Standard PC Hardware: No special hardware is required to run the Java Resume
Generator.
Minimum Requirements:
CPU: Any processor that supports Java (even older CPUs can run Java programs).
RAM: At least 1 GB of RAM is recommended for running both the IDE and Java
programs smoothly.
Display: A basic display that supports GUI applications.
Execution Guide
java Main
If using JavaFX, include the necessary module-paths when running the application.
UCOE / COMP / 3rd Sem / Computer Graphics A.Y. 2024-25
After running the application, a graphical window (JavaFX or Swing) will appear where
you can enter the resume details.
Once the information is entered, the resume will be displayed on-screen in a formatted
style
.
Exit:
Once you finish, close the window or use the close button provided in the application
interface.
If running from an IDE, stop the process by clicking on the "Stop" button.
• CODE OF PROGRAM
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
// Create layout
setLayout(new GridLayout(11, 2));
add(nameLabel); add(nameTextField);
add(emailLabel); add(emailTextField);
add(phoneLabel);
add(phoneTextField);
add(degreeLabel);
add(degreeTextField);
add(universityLabel);
add(universityTextField);
add(graduationYearLabel);
add(graduationYearTextField);
add(jobTitleLabel);
add(jobTitleTextField);
add(employerLabel);
add(employerTextField);
add(jobStartYearLabel);
add(jobStartYearTextField);
add(jobEndYearLabel);
add(jobEndYearTextField);
add(generateButton);
setVisible(true);
}
String resume = "Name: " + name + "\n" + "Email: " + email + "\n" +
"Phone: " + phone + "\n" + "\nEducation:\n"+
"Degree: " + degree + "\n" + "University: " + university + "\n" +
"Graduation Year: " + graduationYear + "\n" + "\nWork Experience:\n" +
"Job Title: " + jobTitle + "\n" + "Employer: " + employer + "\n" +
"Job Start Year: " + jobStartYear + "\n" + "Job End Year: " + jobEndYear + "\n\t\t\t";
JOptionPane.showMessageDialog(this, resume);
}
Code Explanation:
Imports:
• javax.swing.*: Provides classes for building the graphical user interface (GUI)
components like labels, text fields, buttons, etc.
• java.awt.*: Provides the GridLayout class for arranging components in a grid layout.
• java.awt.event.*: Enables event handling, such as responding to button clicks.
Class Definition:
• ResumeGenerator extends JFrame, which means it is a windowed GUI application.
• Implements ActionListener to handle the action event when the "Generate Resume"
button is clicked.
Action Listener:
• The actionPerformed method is called when the "Generate Resume" button is clicked.
• It fetches user input from the text fields using getText().
• A formatted resume string is created by concatenating the user's inputs.
• JOptionPane.showMessageDialog(this, resume) displays the generated resume in a
message dialog window.
Main Method:
• new ResumeGenerator() creates an instance of the ResumeGenerator class, launching
the GUI window.
UCOE / COMP / 3rd Sem / Computer Graphics A.Y. 2024-25
OUTPUT: