public void addEastPanel(JComponent comp){
  mainPanel.add(comp,BorderLayout.EAST);
}

public void addEastPanel ( JComponent comp ) { mainPanel . add ( comp , BorderLayout . EAST ) ; }
adds a panel at the eastern side of the main panel . a button panel or the like can be plugged in thusly .
