Re: a new class for a frame
IF I understand correctly, you want your software to comprise of 2 screens:
A.Client type selection
B.Result Display of client type selection process (information extracted from a database wrt client type selected);
And you have a database mechanism to extract data per client type, for the result display.
All you need is 3 simple classes.
A.A frame class
B.A panel class that extends JPanel
C.A class with the database functionalities
Now, class C is clearly the class with the database functionalities,
while class B would be an extension of JPanel, on which you would create the client selection screen(a panel) and the client results screen(another panel),
where you could easily toggle between those panels via the setVisible ( Boolean ) method invoked for each panel.
next we have the final class, the frame, which you will add class B to.
Re: a new class for a frame
Hi and thanks a lot for your answer
I don't well understand this sentence"next we have the final class, the frame, which you will add class B to. "
In the client class, i have created a "display_clients" method which both
- creates an instance of the connection_database class to connect the database
-permits to display all the selected clients in a new frame.
In the connection_database class , there are all the database connection fonctionnalities
-In the clients_selection class i only propose a graphic interface to choose the selected client.
-in the main class, i create a new instance of the clients_selection frame.
Thanks a lot for telling me if the clients_selection frame can be a part of my project or not, because it is not a class created from the uml methodology(diagramm classes).
Best regards.
curious_programmer