Embed stand alone Java Application within an Eclipse Editor Pane


You can find a screenshot below to show you how a stand alone Java application (operates in one of two modes, AWT mode or SWT mode) can dynamically instantiate AWT and SWING wrapper classes or SWT wrapper classes at run-time. The application uses a new toolkit called Virtual Widget Toolkit. VWT is designed to speak the protocol that the AWT uses. eg, the same interfaces are shared between AWT and VWT so that AWT app can migrate to the VWT without any change in the code (other than the import statements changed).

When the application runs as stand-alone, you can manually choose what type of wrapper classes you would like to use. As seen in the screenshot below.




Console Screen


Once you have made the choice, the application runs as as usual. The application will have the look-and-feel and behaviours of your choice.



Stand Alone Java Application



However, the excited news is that the same stand alone Java application executing in SWT mode can embed itself in a Eclipse editor pane as illustrated in the screenshot below.



Embeded Stand Alone Java Application