jeudi 2 avril 2020

JFrame with Design Pattern Java

I'm creating a project for a university exam. I would create a program to manage a service of football games. The program will have a graphic interface using java. But I have a problem. First of all, I use the MVC pattern and the Observer patter, to separate the parts of my project. When the project has been started, the first view that appears is a JFrame with two buttons, that they permit to create a new account or make login with username and password already present in the program. Thus, if I click on the register button, the current frame (that is initialFrame) must disappear (I have used frame.setVisible(false) ) and must to appear a new frame with the fields to fill for to complete the registration. Once complete a registration (clicking on confirmButton), the registration data must go at class Model for to add a new account in the data structure of the project. With few events, I am succeeded to manage all events, but when the dependencies increase I can't manage all dependencies. Can anyone suggest me a way to use some Design Pattern to handle all dependencies with all frame?

Aucun commentaire:

Enregistrer un commentaire