Skip to main content

System Architecture

MatriculaUniPoo is a Java Swing desktop application built using a two-tier architecture pattern, separating the presentation layer (GUI) from the business logic layer.

Architecture Layers

The application follows a clear separation of concerns between the user interface and business logic, making it maintainable and scalable.

Package Structure

The application is organized into two main packages:

igu Package

Contains all GUI components and user interface frames

logica Package

Houses business logic classes and data models

Directory Layout

src/main/java/
├── igu/
│   ├── Inicio.java        # Welcome screen
│   ├── Registrar.java     # Student registration form
│   ├── Login.java         # Authentication screen
│   └── Matricula.java     # Course enrollment interface
└── logica/
    ├── Main.java          # Application entry point
    ├── Alumno.java        # Student data model
    └── Cursos.java        # Course data model

Application Flow

The application follows a sequential screen flow for student registration and course enrollment:
1

Welcome Screen

The Inicio frame displays the university welcome message with a registration button
2

Student Registration

Students enter their personal information (name, apellido, DNI, and password) in the Registrar frame
3

Authentication

The Login frame validates student credentials against the registered information
4

Course Enrollment

After successful login, the Matricula frame allows students to select and enroll in courses

Entry Point

The application starts from the Main class in the logica package:
logica/Main.java
package logica;

import igu.Inicio;

public class Main {
    public static void main(String[] args) {
        Inicio in = new Inicio();
        in.setVisible(true);
        in.setLocationRelativeTo(null);
    }
}
The setLocationRelativeTo(null) method centers the window on the screen.
The application uses a frame-switching navigation pattern where screens are hidden and shown rather than created and destroyed:
// Example from Inicio.java:74
private void btnRegistrarseActionPerformed(java.awt.event.ActionEvent evt) {
    registrate.setIni(this);
    registrate.setVisible(true);
    registrate.setLocationRelativeTo(null);
    this.setVisible(false);
}
This navigation approach maintains state across screens and provides smooth transitions. Each frame holds references to related frames and uses setter methods to maintain bidirectional navigation.

Key Architectural Patterns

1. MVC-Inspired Separation

The Alumno and Cursos classes in the logica package represent the data models with getters and setters for all properties.

2. Frame Reference Management

Each frame maintains references to related frames for navigation:
igu/Registrar.java
private Inicio ini;
private Login log;
Alumno alu = new Alumno();

public void setIni(Inicio ini) {
    this.ini = ini;
}

public void setLog(Login log) {
    this.log = log;
}
Frame references are set before navigation to ensure bidirectional communication between screens.

3. Data Passing Between Frames

Student credentials are passed from registration to login using constructor parameters:
igu/Registrar.java:207
private void btnRegistrarseActionPerformed(java.awt.event.ActionEvent evt) {
    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);
    } else if (dni.isEmpty()) {
        JOptionPane.showMessageDialog(this, "COMPLETE SU DNI", 
            "Advertencia", JOptionPane.WARNING_MESSAGE);
    } else if (contra.isEmpty()) {
        JOptionPane.showMessageDialog(this, "COMPLETE SU CONTRASEÑA", 
            "Advertencia", JOptionPane.WARNING_MESSAGE);
    } else {
        JOptionPane.showMessageDialog(null, "REGISTRO EXITOSO");
        log = new Login(dni, contra);
        log.setRegis(this);
        log.setVisible(true);
        log.setLocationRelativeTo(null);
        this.setVisible(false);
    }
}

Color Scheme

The application uses a consistent color palette across all screens:
ComponentColorRGB Value
Primary BackgroundDark Teal0, 68, 68
Secondary BackgroundTeal0, 153, 153
TextWhite255, 255, 255
Input TextBlack0, 0, 0
AccentLight Cyan0, 204, 204
The consistent color scheme provides a professional and cohesive user experience throughout the application.

Technology Stack

  • Language: Java
  • GUI Framework: Java Swing
  • Layout Managers:
    • AbsoluteLayout (NetBeans lib.awtextra)
    • GroupLayout
  • IDE: NetBeans (evidenced by auto-generated GUI code)
  • Data Structures: ArrayList for course management
  • UI Components:
    • JFrame, JPanel, JButton
    • JTextField, JPasswordField
    • JLabel, JSeparator
    • JComboBox, JTable
    • DefaultTableModel

Next Steps

GUI Components

Explore detailed documentation of all user interface components

Data Models

Learn about the Alumno and Cursos class structures

Build docs developers (and LLMs) love