Package java.awt

Examples of java.awt.MenuItem.addNotify()


    public SwingPopupMenuPeer(SwingToolkit toolkit, PopupMenu popupMenu) {
        super(toolkit, popupMenu, new JPopupMenu());
        int item_count = popupMenu.getItemCount();
        for (int i = 0; i < item_count; i++) {
            MenuItem menu_item = popupMenu.getItem(i);
            menu_item.addNotify();
            jComponent.add(((SwingMenuComponentPeer<?, ?>) menu_item.getPeer()).jComponent);
        }
    }

    public void setLabel(String text) {
View Full Code Here


    public SwingMenuPeer(SwingToolkit toolkit, Menu menu) {
        super(toolkit, menu, new JMenu());
        int item_count = menu.getItemCount();
        for (int i = 0; i < item_count; i++) {
            MenuItem menu_item = menu.getItem(i);
            menu_item.addNotify();
            jComponent.add(((SwingMenuComponentPeer<?, ?>) menu_item.getPeer()).jComponent);
        }
    }

    @SuppressWarnings("deprecation")
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.