Documentation

Trace:

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
jvx:reference [2020/06/10 13:05]
cduncan [Entry point]
jvx:reference [2020/06/10 13:08]
cduncan [The launcher]
Line 459: Line 459:
 All we have to do there is start the launcher itself. As the comment suggests, there might be work required for a “real” application startup. For this example, it is all we need to do. Of course, we could also directly embed this little function into the launcher implementation itself to save us one class. All we have to do there is start the launcher itself. As the comment suggests, there might be work required for a “real” application startup. For this example, it is all we need to do. Of course, we could also directly embed this little function into the launcher implementation itself to save us one class.
  
-===== The launcher ​=====+===== The Launcher ​=====
  
-The ''​%%ILauncher%%''​ implementation on the other hand contains quite some logicbut nothing not manageable:+The ''​%%ILauncher%%''​ implementationon the other handcontains quite some logic but nothing not manageable:
  
 <code java> <code java>
Line 540: Line 540:
 } }
 </​code>​ </​code>​
-In short, the launcher is kicking off the Swing thread by invoking the startup method on the main Swing thread. This startup method will instantiate the factory and then create the application. From there we only need to set it visible and then our application has started.+In short, the launcher is kicking off the Swing thread by invoking the startup method on the main Swing thread. This startup method will instantiate the factory and then create the application. From therewe only need to set it to visible and then our application has started.
  
-The launcher extends from ''​%%SwingFrame%%''​, that is required because there hasn’t been a factory created yet which could be used by UI components to create themselves. If we’d try to use an UI component before creating/​setting a factory, we would obviously ​see the constructor of the component fail with a ''​%%NullPointerException%%''​.+The launcher extends from ''​%%SwingFrame%%''​. That is required because there hasn’t been a factory created yet that could be used by UI components to create themselves. If we’d try to use an UI component before creating/​setting a factory, we would see the constructor of the component fail with a ''​%%NullPointerException%%''​.
  
-The method ''​%%startup()%%''​ is invoked on the main Swing thread, which also happens to be the main UI thread for [[https://​sourceforge.net/​projects/​jvx/​|JVx]] in this application. Once we are on the main UI thread we can create the application,​ add it and then set everything to visible.+The method ''​%%startup()%%''​ is invoked on the main Swing thread, which also happens to be the main UI thread for [[https://​sourceforge.net/​projects/​jvx/​|JVx]] in this application. Once we are on the main UI threadwe can create the application,​ add itand then set everything to visible.
  
 ===== The application ===== ===== The application =====
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information