public PathController(JList l,JLabel label,DefaultListModel model,JButton add,JFileChooser chooser,JButton remove,JButton up,JButton down,ListDataListener lstnr){
  this.l=l;
  this.label=label;
  this.model=model;
  this.add=add;
  this.remove=remove;
  this.up=up;
  this.down=down;
  this.chooser=chooser;
  this.lstnr=lstnr;
  l.setModel(model);
  if (model != null) {
    model.addListDataListener(this);
  }
  add.setActionCommand("add");
  remove.setActionCommand("remove");
  up.setActionCommand("up");
  down.setActionCommand("down");
  add.addActionListener(this);
  remove.addActionListener(this);
  up.addActionListener(this);
  down.addActionListener(this);
  l.addListSelectionListener(this);
  remove.setEnabled(false);
  up.setEnabled(false);
  down.setEnabled(false);
}

public PathController ( JList l , JLabel label , DefaultListModel model , JButton add , JFileChooser chooser , JButton remove , JButton up , JButton down , ListDataListener lstnr ) { this . l = l ; this . label = label ; this . model = model ; this . add = add ; this . remove = remove ; this . up = up ; this . down = down ; this . chooser = chooser ; this . lstnr = lstnr ; l . setModel ( model ) ; if ( model != null ) { model . addListDataListener ( this ) ; } add . setActionCommand ( "add" ) ; remove . setActionCommand ( "remove" ) ; up . setActionCommand ( "up" ) ; down . setActionCommand ( "down" ) ; add . addActionListener ( this ) ; remove . addActionListener ( this ) ; up . addActionListener ( this ) ; down . addActionListener ( this ) ; l . addListSelectionListener ( this ) ; remove . setEnabled ( false ) ; up . setEnabled ( false ) ; down . setEnabled ( false ) ; }
creates a new instance of pathcontroller
