java - What is the best way to link your application to Swing GUI? -


If I have a GUI class and an application, how should I manage communication between these objects? Should I pass the GUI object to the app or app links for the GUI?

Example:

  Public class app {public app} (GUI GUI = new GUI (this)}}  

or < / P>

  public GUI {public GUI} {app guinea = new app (this)}}  

Ideally you want to submit your application such that different GUI components can use it (later a web / servlet view of your application, Or provide a command line interface) This requirement prohibits contained swing knowledge of your application.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -