Skip to main content

Prerequisites

Before you begin, ensure you have the following installed on your system:

Java Development Kit

JDK 20 or higher required

Apache Maven

Maven 3.6+ for building the project
The application requires Java 20 as specified in the pom.xml. Earlier versions may not work correctly.

Installation

1

Clone the Repository

Clone the MatriculaUniPoo project to your local machine:
git clone <repository-url>
cd Matricula
2

Verify Java Version

Check that you have the correct Java version installed:
java -version
You should see Java 20 or higher in the output.
3

Build the Project

Use Maven to build the project and download dependencies:
mvn clean install
This will:
  • Download the AbsoluteLayout dependency (RELEASE190)
  • Compile all Java source files
  • Package the application as a JAR file

Running the Application

Using Maven

The simplest way to run MatriculaUniPoo is using Maven:
mvn exec:java
This executes the main class defined in pom.xml:
pom.xml
<exec.mainClass>com.mycompany.matricula.Matricula</exec.mainClass>

Using Java Directly

Alternatively, run the compiled JAR file directly:
java -jar target/Matricula-1.0-SNAPSHOT.jar

From IDE

If you’re using an IDE like NetBeans, IntelliJ IDEA, or Eclipse:
  1. Import the project as a Maven project
  2. Locate the main class at src/main/java/logica/Main.java
  3. Right-click and select “Run”
The application entry point is the Main class, which initializes the welcome screen.

Application Flow

Once launched, MatriculaUniPoo follows this workflow:
1

Welcome Screen

The application starts with the Inicio (Welcome) window:
logica/Main.java
public class Main {
    public static void main(String[] args) {
        Inicio in = new Inicio();
        in.setVisible(true);
        in.setLocationRelativeTo(null);
    }
}
The window is centered on screen with setLocationRelativeTo(null).
2

Student Registration

Click the REGISTRARSE button to open the registration form where students enter:
  • Nombre (First Name)
  • Apellido (Last Name)
  • DNI (National ID)
  • Contraseña (Password)
The registration handler validates all fields:
igu/Registrar.java
String nombre = txtNombre.getText();
String apellido = txtApellido.getText();
String dni = txtDni.getText();
String contra = txtContra.getText();

if (nombre.isEmpty()) {
    JOptionPane.showMessageDialog(this, "COMPLETE SU NOMBRE", 
        "Advertencia", JOptionPane.WARNING_MESSAGE);
} else if (apellido.isEmpty()) {
    JOptionPane.showMessageDialog(this, "COMPLETE SU APELLIDO", 
        "Advertencia", JOptionPane.WARNING_MESSAGE);
}
// ... additional validations
3

Course Enrollment

After successful registration, students can select courses from five subjects:
  • Matemática (Mathematics)
  • Historia del Perú (History of Peru)
  • Literatura (Literature)
  • Cívica (Civics)
  • Ciencias (Sciences)
Each course has multiple professors and time slots to choose from.
4

Finalize Enrollment

Review selected courses in the table and click Matricula to complete enrollment:
igu/Matricula.java
private void btnRegistrarActionPerformed(java.awt.event.ActionEvent evt) {
    JOptionPane.showMessageDialog(null, "MATRICULA COMPLETADA");
}

Project Structure

Understanding the project layout will help you navigate the codebase:
Matricula/
├── src/
│   └── main/
│       └── java/
│           ├── igu/              # User Interface (GUI) components
│           │   ├── Inicio.java   # Welcome screen
│           │   ├── Registrar.java # Student registration form
│           │   ├── Login.java    # Login screen
│           │   └── Matricula.java # Course enrollment form
│           └── logica/           # Business logic
│               ├── Main.java     # Application entry point
│               ├── Alumno.java   # Student data model
│               └── Cursos.java   # Course data model
├── pom.xml                       # Maven configuration
└── target/                       # Compiled output
All GUI classes extend javax.swing.JFrame and use NetBeans’ AbsoluteLayout for component positioning.

Key Components

Data Models

The application uses two main data models:
package logica;

public class Alumno {
    private String nombre, apellido, contraseña, dni;
    
    public Alumno() {  
    }

    public Alumno(String nombre, String apellido, 
                  String contraseña, String dni) {
        this.nombre = nombre;
        this.apellido = apellido;
        this.contraseña = contraseña;
        this.dni = dni;
    }
    
    // Getters and setters...
}

GUI Windows

Each window is a standalone JFrame with navigation between screens:
igu/Inicio.java
private void btnRegistrarseActionPerformed(java.awt.event.ActionEvent evt) {
    registrate.setIni(this);
    registrate.setVisible(true);
    registrate.setLocationRelativeTo(null);
    this.setVisible(false);
}
Windows are hidden rather than disposed when navigating, allowing users to return to previous screens.

Troubleshooting

Application Won’t Start

If the application fails to launch:
  1. Verify Java version: Ensure Java 20 or higher is installed
  2. Check dependencies: Run mvn dependency:tree to verify all dependencies are downloaded
  3. Clean and rebuild: Execute mvn clean install to rebuild from scratch

Missing AbsoluteLayout Error

If you see errors related to org.netbeans.lib.awtextra.AbsoluteLayout:
mvn dependency:purge-local-repository
mvn clean install
This will re-download the AbsoluteLayout library.

Window Display Issues

If GUI windows don’t display correctly:
  • Ensure you’re running on a system with a graphical environment
  • On Linux, you may need to set the DISPLAY environment variable
  • Try different Java Swing Look and Feel settings

Next Steps

Now that you have MatriculaUniPoo running, explore these topics:

Architecture

Learn about the application’s design and structure

Development Guide

Start contributing to the project

Components

Explore the component documentation

Data Model

Understand the domain models
For a detailed understanding of how the registration and enrollment system works, check out the Architecture page.

Build docs developers (and LLMs) love