A basic Hello World example. It creates and displays a Hello World label component.
Most of QSwing components can be displayed outside of the top-level containers (the feature is mainly for development purposes). The major drawback, comparing to Swing, is that the GUI event loop needs to be explicitly started by invoking the QSwing.startEventLoop() method. This method does not return until the GUI event loop quits. It is strongly recommended that the GUI event loop is started from the application's main thread (the thread that calls the main method). This is because some platforms do not allow the GUI event loop to run outside the main thread. Windows and Linux allow this but it is not portable in general.
package yu.ac.bg.etf.javaqx.examples;
|
![]() |
![]() |
![]() |
![]() |
![]() |
HelloWorld on Windows Vista |
HelloWorld on Windows XP |
HelloWorld on Windows 98 |
HelloWorld on SUSE Linux |
HelloWorld on Ubuntu Linux |