int ic = popupMenu.getItemCount(); for(int i = 0; i < ic ; i++){ MenuItem mi = popupMenu.getItem(i); JMenuItem jmi = new JMenuItem(mi.getLabel());
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 SwingPopupMenuPeer(SwingToolkit toolkit, PopupMenu popupMenu) {        super(toolkit, popupMenu, new JPopupMenu());        int ic = popupMenu.getItemCount();        for(int i = 0; i < ic ; i++){            MenuItem mi = popupMenu.getItem(i);            JMenuItem jmi = new JMenuItem(mi.getLabel());        }    }