private void init(){
  setTitle("World Dialog");
  fillFieldValues();
  worldWidth.setColumns(initialWorldWidth);
  mainPanel.addItem("World Width",worldWidth);
  mainPanel.addItem("World Height",worldHeight);
  mainPanel.addItem("Moving objects initiates creature movement",initiateMovement);
  mainPanel.addItem("Objects block movement",inhibitMovement);
  mainPanel.addItem("Enable boundaries (if not, agents wrap around)",useLocalBounds);
  mainPanel.addItem("Update network while dragging objects",updateDrag);
  mainPanel.addItem("Set Background Color",colorChoice);
  setContentPane(mainPanel);
  colorChoice.addActionListener(this);
  updateDrag.addActionListener(this);
}

private void init ( ) { setTitle ( "World Dialog" ) ; fillFieldValues ( ) ; worldWidth . setColumns ( initialWorldWidth ) ; mainPanel . addItem ( "World Width" , worldWidth ) ; mainPanel . addItem ( "World Height" , worldHeight ) ; mainPanel . addItem ( "Moving objects initiates creature movement" , initiateMovement ) ; mainPanel . addItem ( "Objects block movement" , inhibitMovement ) ; mainPanel . addItem ( "Enable boundaries (if not, agents wrap around)" , useLocalBounds ) ; mainPanel . addItem ( "Update network while dragging objects" , updateDrag ) ; mainPanel . addItem ( "Set Background Color" , colorChoice ) ; setContentPane ( mainPanel ) ; colorChoice . addActionListener ( this ) ; updateDrag . addActionListener ( this ) ; }
this method initialises the components on the panel .
