Hello, I am a java newbie but not to programming and trying to learn and put a desktop application together. I would like to know is there a right/wrong ways to open/start a Java desktop application. My thoughts are as follows: Have an "application manager object" that basically handles the entire application. This object would be created in the main function of the class. This object would then handle everything from there open new frames build new objects from an init() function called from the main function. When the init control is returned to the init functions the application would naturally end.
Is this the correct way to handle a desktop application and will when the init() function opens a window will the function keep control until that window is closed???
It depends on what you mean my "handles the entire application". Assuming you only have one main window, you will probably just want to extend JFrame. There you will create all your controls, hook up listeners, etc. You can just instantiate your derived JFrame in the main method and put the main method in that class. What more are you thinking the application manager class should do?
It's worth noting that a framework to manage a Swing application is one of the big drivers behind the Swing Application Framework project ( https://appframework.dev.java.net/ ). It has the concept of an "Application" and handles calling back into your code to set things up (on the right GUI thread) and shut things down, handles persistent app info, resource injection...
Yes and No: Eclipse RCP is more comparable to the much larger NetBeans Platform framework. That system has all kinds of large-app facilities, like modules, updates, etc. The Swing app framework is much smaller and more focused on basic, boilerplate needs of even small and medium sized applications.