private JMenuItem createMenuItem(String name,String action){
  JMenuItem item=new VariableWidthMenuItem(name);
  item.addActionListener(new CommandActionListener(action));
  item.setBorder(null);
  return item;
}

private JMenuItem createMenuItem ( String name , String action ) { JMenuItem item = new VariableWidthMenuItem ( name ) ; item . addActionListener ( new CommandActionListener ( action ) ) ; item . setBorder ( null ) ; return item ; }
create a menu item .
