Embed Swing control into SWT composite

For this requirement, we need an SWT_AWT bridge to create EmbeddedFrame which will be used to add Swing Controls.

Sample Code:

 JLabel label = new JLabel("sample label");  
 Composite composite = new Composite(shell, SWT.EMBEDDED);  
 Frame frame = SWT_AWT.new_Frame(composite);  
 frame.setLayout(new BorderLayout());  
 frame.add(label,BorderLayout.CENTER);  

Comments

Popular posts from this blog

Comparison of Cloud Services

When to use Import-Package and Require-Bundle in Eclipse Plugin?