Package javax.swing

Examples of javax.swing.JPopupMenu.doLayout()


    };
    WidgetAdapter wa = ExtensionRegistry.createWidgetAdapter(JMenuItem.class);
    JMenuItem jmi = (JMenuItem) wa.getWidget();
    menu.add(jmi);
    menu.setSize(menu.getPreferredSize());
    menu.doLayout();
    return menu;
  }

  @Override
  protected Component newWidget() {
View Full Code Here


      ((JPopupMenu) widget).removeAll();
      for (int i = 0; i < menuComponents.length; i++) {
        ((JPopupMenu) widget).add(menuComponents[i]);
      }
      menu.setPreferredSize(menu.getPreferredSize());
      menu.doLayout();
      this.hotspotPoint = new Point(attached.getWidth() / 2, attached.getHeight() / 2);
      attach();
    }
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.