Using many JFrame? (the ones Netbeans brings by default)

2

I do not know if there will be a good practice for this, since I have a screen with a JMenu with many items

->Menu   
->Usuario  
{  
   ->Iniciar sesion  
   ->Registrarse   
   ->Informacion de usuario  
}  
->Ayuda  
{
   -> Instrucciones de juego  
   -> Acerca del juego  
}  

Then I create a JFrame Form for each of these if necessary, registration window, login window, information window, help window, etc. And I do not know if this is a common practice or there is a more practical way to work this.

    
asked by Parzival 26.02.2017 в 16:33
source

2 answers

2

In the decision how you handle the windows theme in an application there are no best practices. If you compare for example the old Freehand or the Gimp with Photoshop, you realize that some applications use multiple main windows (which has its advantages for example in systems with multiple screens) and others manage this distribution of windows by tabs or docks.

That said, if there are good alternatives to create multiple JFrame that can be considered. Most of these alternatives are based on JPane with a layout.

A bad practice is only what does not work or that makes your users jump out the window (or throw their equipment for it).

    
answered by 26.02.2017 / 22:24
source
3

I think it could be a bad practice if when opening a new window the other one remains open since it would be uncomfortable for the user, what you could do in this case would be to have a JPanel for each option that you mention and load the JPanel that is required in a single JFrame . Also if you prefer you can use a JTabbedPane (tabs) in a JFrame and thus have all the options in a single JFrame.

    
answered by 26.02.2017 в 18:37