Skip to main content



      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] Tue, 04 September 2012 21:01
Eclipse UserFriend
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:Syntax Coloring usability suggestion
Next Topic:Autocompile delay
Goto Forum:
  


Current Time: Fri Jul 04 17:51:10 EDT 2025

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

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

Back to the top