Can I put an AWT component as a menu contribution? [message #908222] |
Tue, 04 September 2012 21:01 |
Eclipse User |
|
|
|
Hi there,
I am currently developing a little tool, the uses a JIDEPopup that can appear across multiple editors in my RCP Application. Problem is that, for the JIDEPopup to be focusable it needs a visible AWT component owner.
Now my possible solution for this is to make a trim menu item to be able to hook onto. Now at the moment I've been able to get the actual trim menu up and running. And I've taken the parent Toolbar widget, created a composite, and SWT_AWT bridged a Frame to which I've added a JPanel with a JButton.
Problem is I can't see them on the screen. Is there something I'm missing?
@Override
public void fillToolBar(ToolBar parent, int orientation, int index) {
frameComposite = new Composite(parent, SWT.EMBEDDED);
Frame frame = SWT_AWT.new_Frame(frameComposite);
JApplet jApplet = new JApplet();
JPanel panel = new JPanel();
panel.add(new JButton("Hello"));
jApplet.add(panel);
frame.add(jApplet);
}
|
|
|
Powered by
FUDForum. Page generated in 0.07624 seconds