public PowerManagerMenu(){
  super();
  ButtonGroup group=new ButtonGroup();
  setText("Connection");
  List<PowerManager> managers=InstanceManager.getList(PowerManager.class);
  for (  PowerManager mgr : managers) {
    if (mgr != null) {
      JMenuItem item=new JRadioButtonMenuItem(mgr.getUserName());
      add(item);
      group.add(item);
      items.add(item);
      item.addActionListener(null);
    }
  }
  setDefault();
}

public PowerManagerMenu ( ) { super ( ) ; ButtonGroup group = new ButtonGroup ( ) ; setText ( "Connection" ) ; List < PowerManager > managers = InstanceManager . getList ( PowerManager . class ) ; for ( PowerManager mgr : managers ) { if ( mgr != null ) { JMenuItem item = new JRadioButtonMenuItem ( mgr . getUserName ( ) ) ; add ( item ) ; group . add ( item ) ; items . add ( item ) ; item . addActionListener ( null ) ; } } setDefault ( ) ; }
create a powermanager menu .
