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

Posted by Java Coder on Stack Overflow See other posts from Stack Overflow or by Java Coder
Published on 2009-05-03T12:31:21Z Indexed on 2010/03/27 16:53 UTC
Read the original article Hit count: 195

Filed under:
|
|

If I have Swing GUI class and application, how should I manage communication between these objects? Should I pass GUI object link to app or app link to GUI?

Example:

public class App{

public App() { GUI gui = new GUI(this) }

}

or

public GUI{ public GUI() { App gui = new App(this) } }

© Stack Overflow or respective owner

Related posts about java

Related posts about swing