public void update()
   {
   
      
      if(s==null)
      {
         
         sidv.setText("");
         spositionv.setText("");
         ssugarv.setText("");
         smaxv.setText("");
         sagentv.setText("");
         
      }
      else
      {
         sidv.setText(""+s.getID());
         spositionv.setText(""+String.format("(%d, %d)",s.getX(),s.getY()));
         ssugarv.setText(""+s.getSugar());
         smaxv.setText(""+s.getMaxSugar());
         sagentv.setText(""+s.getAgentID());
      }
      
      if(a==null)
      {
         aidv.setText("");
         apositionv.setText("");
         asugarv.setText(df.format(0));
         aagev.setText("");
         ametv.setText("");
      }
      else
      {
         if(a.removable())
         {
            a=null;
         }
         else
         {
            aidv.setText(""+a.getID());
            apositionv.setText(""+String.format("(%d, %d)",a.getX(),a.getY()));
            asugarv.setText(""+df.format(a.getSugar()));
            aagev.setText(""+a.getAge());
            ametv.setText(""+a.getMetabolism());
         }
      }
   }