job portal system in java

introduction

The Job Portal System is a job-matching platform built in Java that connects employers with potential employees. Job seekers can register, create profiles, upload resumes, and apply for jobs. Employers can post job vacancies, browse applicants, and schedule interviews. 

The system provides filtering features based on job type, skill level, and experience. This platform brings both parties together through a user-friendly interface that simplifies the job hunt and recruitment process.

 It’s an excellent demonstration of a multi-user system with real-world use cases and is useful for students interested in creating professional networking or HR tech applications.

steps to create job portal system

  • Identify user types — job seekers and employers.

  • Design registration, profile, and job posting forms.

  • Create User, Job, Application classes.

  • Implement resume upload feature (file handling).

  • Store users, jobs, applications in DB.

  • Add job search and filter functionality.

  • Link applications to jobs and users.

  • Test registration, job posting, application.

  • Add admin panel to manage users/jobs.

  • Document thoroughly.

code explanation

 

1. JobApplication Class

class JobApplication {
    String name, email, jobTitle, qualification;

    JobApplication(String name, String email, String jobTitle, String qualification) {
        this.name = name;
        this.email = email;
        this.jobTitle = jobTitle;
        this.qualification = qualification;
    }
}
  • This class is a data model for each job application.

  • Stores name, email, job title, and qualification for each applicant.

2. JobPortalSystem Class

This is the main GUI class that extends JFrame.

 Global Components

private JTextField tfName, tfEmail, tfJobTitle, tfQualification;
private JTable table;
private DefaultTableModel model;
private ArrayList applications = new ArrayList();
  • GUI input fields for name, email, job title, and qualification.

  • JTable displays the application data.

  • applications: stores submitted applications using ArrayList<JobApplication>.

 3. Constructor: JobPortalSystem()

 Title and Layout

 
setTitle("💼 Job Portal System");
setSize(900, 550);
...
setLayout(new BorderLayout());
  • Sets the window title and size.

  • Uses BorderLayout for better component organization.

 Heading Label

JLabel heading = new JLabel("💼 Online Job Portal", JLabel.CENTER);
  • A nice header at the top with background color and font styling.

 Input Form

JPanel formPanel = new JPanel(new GridLayout(5, 2, 12, 12)); formPanel.add(new JLabel("Applicant Name:")); formPanel.add(tfName); ...
  • Organized using GridLayout with 5 rows and 2 columns.

  • Collects user details via text fields.

 Buttons

JButton btnApply = new JButton("📨 Apply");
JButton btnClear = new JButton("❌ Clear");
  • Apply submits the form.

  • Clear resets the form fields.

  • styleButton() method sets visual styles like color, font, etc.

 4. Table for Job Applications

model = new DefaultTableModel(new String[]{"Name", "Email", "Job Title", "Qualification"}, 0);
table = new JTable(model);
  • JTable with 4 columns showing all the submitted applications.

  • Connected with DefaultTableModel for easy row manipulation.

 5. Action Listeners

 
btnApply.addActionListener(e -> applyJob());
btnClear.addActionListener(e -> clearForm());
  • applyJob() → validates and saves new application.

  • clearForm() → clears input fields.

 6. applyJob()

private void applyJob() {
    if (name.isEmpty() || email.isEmpty() || ...) {
        JOptionPane.showMessageDialog(...);
        return;
    }
    applications.add(new JobApplication(...));
    updateTable();
    clearForm();
}
  • Checks for empty fields.

  • Adds valid job application to list.

  • Updates the table.

  • Clears the form afterward.

 7. updateTable()

private void updateTable() {
    model.setRowCount(0);
    for (JobApplication ja : applications) {
        model.addRow(new Object[]{ja.name, ja.email, ja.jobTitle, ja.qualification});
    }
}
  • Clears the table.

  • Re-adds all items from the applications list.

 8. clearForm()

private void clearForm() {
    tfName.setText("");
    tfEmail.setText("");
    tfJobTitle.setText("");
    tfQualification.setText("");
}
  • Clears all input fields.

 9. Button Styling

private void styleButton(JButton button) {
    button.setBackground(new Color(41, 128, 185));
    button.setForeground(Color.white);
    ...
}
  • Gives a consistent modern style to buttons.

 10. Main Method

public static void main(String[] args) {
    SwingUtilities.invokeLater(() -> new JobPortalSystem().setVisible(true));
}
  • Safely launches the GUI on the Event Dispatch Thread (EDT).

source code

				
					import javax.swing.*;
import javax.swing.table.DefaultTableModel;
import java.awt.*;
import java.awt.event.*;
import java.util.ArrayList;

class JobApplication {
    String name, email, jobTitle, qualification;

    JobApplication(String name, String email, String jobTitle, String qualification) {
        this.name = name;
        this.email = email;
        this.jobTitle = jobTitle;
        this.qualification = qualification;
    }
}

public class JobPortalSystem extends JFrame {
    private JTextField tfName, tfEmail, tfJobTitle, tfQualification;
    private JTable table;
    private DefaultTableModel model;
    private ArrayList applications = new ArrayList();

    public JobPortalSystem() {
        setTitle("💼 Job Portal System");
        setSize(900, 550);
        setLocationRelativeTo(null);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setLayout(new BorderLayout());

        JLabel heading = new JLabel("💼 Online Job Portal", JLabel.CENTER);
        heading.setFont(new Font("Segoe UI", Font.BOLD, 26));
        heading.setOpaque(true);
        heading.setBackground(new Color(33, 47, 61));
        heading.setForeground(Color.white);
        heading.setBorder(BorderFactory.createEmptyBorder(15, 0, 15, 0));
        add(heading, BorderLayout.NORTH);

        JPanel formPanel = new JPanel(new GridLayout(5, 2, 12, 12));
        formPanel.setBorder(BorderFactory.createTitledBorder("Apply for a Job"));
        formPanel.setBackground(new Color(245, 245, 245));

        tfName = new JTextField();
        tfEmail = new JTextField();
        tfJobTitle = new JTextField();
        tfQualification = new JTextField();

        formPanel.add(new JLabel("Applicant Name:"));
        formPanel.add(tfName);
        formPanel.add(new JLabel("Email:"));
        formPanel.add(tfEmail);
        formPanel.add(new JLabel("Job Title:"));
        formPanel.add(tfJobTitle);
        formPanel.add(new JLabel("Qualification:"));
        formPanel.add(tfQualification);

        JButton btnApply = new JButton("📨 Apply");
        JButton btnClear = new JButton("❌ Clear");
        styleButton(btnApply);
        styleButton(btnClear);
        formPanel.add(btnApply);
        formPanel.add(btnClear);
        add(formPanel, BorderLayout.WEST);

        model = new DefaultTableModel(new String[]{"Name", "Email", "Job Title", "Qualification"}, 0);
        table = new JTable(model);
        table.setRowHeight(22);
        table.setFont(new Font("SansSerif", Font.PLAIN, 14));
        table.getTableHeader().setFont(new Font("SansSerif", Font.BOLD, 14));
        JScrollPane tablePane = new JScrollPane(table);
        add(tablePane, BorderLayout.CENTER);

        btnApply.addActionListener(e -&gt; applyJob());
        btnClear.addActionListener(e -&gt; clearForm());

        // Example data
        applications.add(new JobApplication("John Doe", "john@mail.com", "Software Developer", "B.Tech"));
        applications.add(new JobApplication("Jane Smith", "jane@mail.com", "Graphic Designer", "BFA"));
        updateTable();
    }

    private void applyJob() {
        String name = tfName.getText().trim();
        String email = tfEmail.getText().trim();
        String jobTitle = tfJobTitle.getText().trim();
        String qualification = tfQualification.getText().trim();

        if (name.isEmpty() || email.isEmpty() || jobTitle.isEmpty() || qualification.isEmpty()) {
            JOptionPane.showMessageDialog(this, "Please fill all fields!", "Warning", JOptionPane.WARNING_MESSAGE);
            return;
        }

        applications.add(new JobApplication(name, email, jobTitle, qualification));
        updateTable();
        clearForm();
    }

    private void updateTable() {
        model.setRowCount(0);
        for (JobApplication ja : applications) {
            model.addRow(new Object[]{ja.name, ja.email, ja.jobTitle, ja.qualification});
        }
    }

    private void clearForm() {
        tfName.setText("");
        tfEmail.setText("");
        tfJobTitle.setText("");
        tfQualification.setText("");
    }

    private void styleButton(JButton button) {
        button.setBackground(new Color(41, 128, 185));
        button.setForeground(Color.white);
        button.setFont(new Font("SansSerif", Font.BOLD, 14));
        button.setFocusPainted(false);
    }

    public static void main(String[] args) {
        SwingUtilities.invokeLater(() -&gt; new JobPortalSystem().setVisible(true));
    }
}

				
			

output

More java Pojects
Get Huge Discounts