0% found this document useful (0 votes)
57 views

JAVA Mini Project

Uploaded by

Prince Kaswala
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

JAVA Mini Project

Uploaded by

Prince Kaswala
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

UCOE / COMP / 3rd Sem / Computer Graphics A.Y.

2024-25

Resume Generator Using JAVA Programming

Problem Statement: Design and implement a Resume Generator


application using Java that allows users to input their personal,
educational, and professional details, and generates a formatted resume
displayed directly on the screen. Team

Member Details:

Roll No: 151 Roll No: 152 Roll No: 153 Roll No. 154

Name: Umang Name: Srikanth Name: Prince Kaswala Name: Vedant


Panchal Reddy Ambwad
Class: SE - B Class: SE - B Class: SE - B Class: SE – B

Branch: COMP Branch: COMP Branch: COMP Branch: COMP

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.

Integrated Development Environment (IDE):

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

Setting up the Program:

Open your chosen IDE (e.g., IntelliJ IDEA or Eclipse).


Create a new Java project and name it something like ResumeGenerator.
Create separate classes for different components of the application (e.g., Main.java,
ResumeGeneratorUI.java, ResumeTemplate.java).
If using JavaFX, ensure that the JavaFX SDK is added to your project settings:
Set the module-path for the JavaFX libraries.
Include the following VM arguments when running JavaFX programs:
bash

--module-path <path_to_javafx_lib> --add-modules javafx.controls,javafx.fxml

Compiling and Running:

In IntelliJ IDEA or Eclipse:


Open the main Java file (Main.java).
Click on the Run button in the IDE to compile and execute the program.
If running through the command line, navigate to the project directory and use the
following command to compile:
bash
javac Main.java
Then run the program with:
bash

java Main
If using JavaFX, include the necessary module-paths when running the application.
UCOE / COMP / 3rd Sem / Computer Graphics A.Y. 2024-25

Previewing the Resume:

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.*;

public class ResumeGenerator extends JFrame implements ActionListener {


private JLabel nameLabel, emailLabel, phoneLabel, degreeLabel, universityLabel,
graduationYearLabel, jobTitleLabel, employerLabel, jobStartYearLabel,
jobEndYearLabel;
private JTextField nameTextField, emailTextField, phoneTextField, degreeTextField,
universityTextField, graduationYearTextField, jobTitleTextField, employerTextField,
jobStartYearTextField, jobEndYearTextField;
private JButton generateButton;

public ResumeGenerator() { setTitle("Resume Generator");


setSize(600, 500);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

// Create labels for user input

nameLabel = new JLabel("Full Name:");


emailLabel = new JLabel("Email Address:");
phoneLabel = new JLabel("Phone Number:");
degreeLabel = new JLabel("Highest Degree:");
universityLabel = new JLabel("University Name:");
graduationYearLabel = new JLabel("Graduation Year:");
jobTitleLabel = new JLabel("Previous Job Title:");
employerLabel = new JLabel("Previous Employer:");
jobStartYearLabel = new JLabel("Job Start Year:");
jobEndYearLabel = new JLabel("Job End Year:");

// Create text fields for user input nameTextField = new JTextField(20);


emailTextField = new JTextField(20);
phoneTextField = new JTextField(20);
degreeTextField = new JTextField(20);
UCOE / COMP / 3rd Sem / Computer Graphics A.Y. 2024-25

universityTextField = new JTextField(20);


graduationYearTextField = new JTextField(20);
jobTitleTextField = new JTextField(20);
employerTextField = new JTextField(20);
jobStartYearTextField = new JTextField(20);
jobEndYearTextField = new JTextField(20);

// Create generate button


generateButton = new JButton("Generate Resume");
generateButton.addActionListener(this);

// 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);
}

public void actionPerformed(ActionEvent e) {


// Get user input from text fields
String name = nameTextField.getText();
String email = emailTextField.getText();
String phone = phoneTextField.getText();
String degree = degreeTextField.getText();
String university = universityTextField.getText();
String graduationYear = graduationYearTextField.getText();
String jobTitle = jobTitleTextField.getText();
String employer = employerTextField.getText();
String jobStartYear = jobStartYearTextField.getText();
String jobEndYear = jobEndYearTextField.getText();
UCOE / COMP / 3rd Sem / Computer Graphics A.Y. 2024-25

// Generate resume and display in message dialog

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);
}

public static void main(String[] args) { new ResumeGenerator();


}
}

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.

GUI Setup (Constructor):


• The constructor ResumeGenerator() sets up the window's title, size, and closing
behavior.
• It defines several JLabel components for labels like "Full Name," "Email Address," etc.
• Corresponding JTextField components are created for the user to input data like name,
email, phone number, degree, etc.
• A JButton named generateButton is added to trigger the resume generation.
• setLayout(new GridLayout(11, 2)) sets a 2-column grid layout with 11 rows to organize
the labels and text fields.
• The components are added to the frame in the desired order.

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:

You might also like