public void addProg(Class<?> demoClass){
  JMenuItem item=addDemoToMenu(progsMenu,demoClass);
  item.addActionListener(new ProgStarter(demoClass));
}

public void addProg ( Class < ? > demoClass ) { JMenuItem item = addDemoToMenu ( progsMenu , demoClass ) ; item . addActionListener ( new ProgStarter ( demoClass ) ) ; }
adds a new console application demo to the menu . the class is expected to be part of a package and to provide a static main method .
