> For the complete documentation index, see [llms.txt](https://educacion.gitbook.io/programacion/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://educacion.gitbook.io/programacion/exercicios-java/ud5-exercicios/modelo-vista-controlador/modelo-vista-controlador-iii.md).

# Modelo Vista Controlador III

1. Crea unha clase ControladorPersona que vai a ter:
   1. Un atributo VentanaPrincipal denominado vista, e outro atributo PersonaService denominado servicio
   2. Un método privado denominado cargarTabla(), que vai a facer o seguinte:
      1. Na taboa do panel centrar vai a poñer as filas a cero (setRowCount(0)
      2. O servicio vai a recuperar a lista das persoas do ficheiro
      3. Vanse engadir cada unha das persoas na taboa do panel central
   3. Un constructor que reciba a VentanaPrincipal e a PersonaService, settee os valores e ademais chame a cargarTabla()
2. Modifica a clase App para que no main ademais dos elementos anteriormente instanciados, instancie un ControladorPersoa. Proba a aplicación e verifica que carga os datos do ficheiro.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://educacion.gitbook.io/programacion/exercicios-java/ud5-exercicios/modelo-vista-controlador/modelo-vista-controlador-iii.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
