public BarChartGui(final GenericFrame frame,final BarChartComponent component){
  super(frame,component);
  setPreferredSize(PREFERRED_SIZE);
  actionManager=new PlotActionManager(this);
  setLayout(new BorderLayout());
  JButton deleteButton=new JButton("Delete");
  deleteButton.setActionCommand("Delete");
  deleteButton.addActionListener(this);
  JButton addButton=new JButton("Add");
  addButton.setActionCommand("Add");
  addButton.addActionListener(this);
  JPanel buttonPanel=new JPanel();
  buttonPanel.add(deleteButton);
  buttonPanel.add(addButton);
  createAttachMenuBar();
  add("Center",chartPanel);
  add("South",buttonPanel);
}

public BarChartGui ( final GenericFrame frame , final BarChartComponent component ) { super ( frame , component ) ; setPreferredSize ( PREFERRED_SIZE ) ; actionManager = new PlotActionManager ( this ) ; setLayout ( new BorderLayout ( ) ) ; JButton deleteButton = new JButton ( "Delete" ) ; deleteButton . setActionCommand ( "Delete" ) ; deleteButton . addActionListener ( this ) ; JButton addButton = new JButton ( "Add" ) ; addButton . setActionCommand ( "Add" ) ; addButton . addActionListener ( this ) ; JPanel buttonPanel = new JPanel ( ) ; buttonPanel . add ( deleteButton ) ; buttonPanel . add ( addButton ) ; createAttachMenuBar ( ) ; add ( "Center" , chartPanel ) ; add ( "South" , buttonPanel ) ; }
construct the gui bar chart .
