Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Can I put an AWT component as a menu contribution?
Can I put an AWT component as a menu contribution? [message #908222] Wed, 05 September 2012 01:01
Matthew Lay is currently offline Matthew LayFriend
Messages: 3
Registered: August 2012
Junior Member
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);
    
  }
Previous Topic:Autocompile delay
Next Topic:Cannot open Eclipse [Java Path Issue]
Goto Forum:
  


Current Time: Sun Aug 20 19:34:58 GMT 2017

Powered by FUDForum. Page generated in 0.11959 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software