private void updateChart(){
  mainPanel.removeAll();
  GridBagConstraints constraints=new GridBagConstraints();
  constraints.fill=GridBagConstraints.BOTH;
  constraints.gridx=0;
  constraints.gridy=0;
  constraints.gridwidth=1;
  constraints.weightx=1;
  constraints.weighty=1;
  constraints.anchor=GridBagConstraints.CENTER;
  JPanel chartPanel=createChartPanel();
  chartPanel.setOpaque(true);
  chartPanel.setBackground(ColorAndFontConstants.BACKGROUND_COLOR);
  chartPanel.setForeground(ColorAndFontConstants.TEXT_COLOR);
  mainPanel.add(chartPanel,constraints);
}

private void updateChart ( ) { mainPanel . removeAll ( ) ; GridBagConstraints constraints = new GridBagConstraints ( ) ; constraints . fill = GridBagConstraints . BOTH ; constraints . gridx = 0 ; constraints . gridy = 0 ; constraints . gridwidth = 1 ; constraints . weightx = 1 ; constraints . weighty = 1 ; constraints . anchor = GridBagConstraints . CENTER ; JPanel chartPanel = createChartPanel ( ) ; chartPanel . setOpaque ( true ) ; chartPanel . setBackground ( ColorAndFontConstants . BACKGROUND_COLOR ) ; chartPanel . setForeground ( ColorAndFontConstants . TEXT_COLOR ) ; mainPanel . add ( chartPanel , constraints ) ; }
update the chart panel ( the active wallet may have changed ) .
