public World initialiseWorld(Pattern p) throws PatternFormatException 
  {
    World result = null;
    if (longButton.isSelected()) 
    {
      result = new PackedWorld();
    } 
    else if (arrayButton.isSelected()) 
    {
      result = new ArrayWorld(p.getWidth(),p.getHeight());
    } 
    else if (agingButton.isSelected()) 
    {
      result = new AgingWorld(p.getWidth(),p.getHeight());
    }
    else if (hashButton.isSelected())
    {
      result = new HashWorld(p.getWidth(),p.getHeight());
    }
    if (result != null)  p.initialise(result);
    return result;
  }