with Javax.Swing.JMenu;
with Javax.Swing.JMenuItem;
procedure test is
   x : Javax.Swing.JMenu.Ref;
   y : Javax.Swing.JMenuItem.Ref;
begin
   Javax.Swing.JMenu.remove(x,y);
   Javax.Swing.JMenu.remove(x,
      Javax.Swing.JMenuItem.Typ(y.all)'access);
end test;
