public static final void addMenuItem(String s,ActionListener l,JPopupMenu m,boolean enable,int idx){
  JMenuItem item=m instanceof SkinPopupMenu ? new SkinMenuItem(s) : new JMenuItem(s);
  item.addActionListener(l);
  item.setEnabled(enable);
  m.add(item,idx);
}

public static final void addMenuItem ( String s , ActionListener l , JPopupMenu m , boolean enable , int idx ) { JMenuItem item = m instanceof SkinPopupMenu ? new SkinMenuItem ( s ) : new JMenuItem ( s ) ; item . addActionListener ( l ) ; item . setEnabled ( enable ) ; m . add ( item , idx ) ; }
adds a menu item defined by the actionlistener & string to the jpopupmenu , enabled or not at the given index .
