private void initPanel(){
  if (coloringMethod.getSelectedItem() == "None") {
    clearColoringPanel();
    currentColoringPanel=getNonePanel();
    baseColorButton.setVisible(true);
    baseColorIndicator.setVisible(true);
    mainPanel.add(currentColoringPanel);
  }
 else   if (coloringMethod.getSelectedItem() == "DecayTrail") {
    clearColoringPanel();
    currentColoringPanel=getDecayTrailPanel();
    baseColorButton.setVisible(true);
    baseColorIndicator.setVisible(true);
    mainPanel.add(currentColoringPanel);
  }
 else   if (coloringMethod.getSelectedItem() == "Frequency") {
    clearColoringPanel();
    currentColoringPanel=getFrequencyPanel();
    baseColorButton.setVisible(true);
    baseColorIndicator.setVisible(true);
    mainPanel.add(currentColoringPanel);
  }
  pack();
  setLocationRelativeTo(null);
}

private void initPanel ( ) { if ( coloringMethod . getSelectedItem ( ) == "None" ) { clearColoringPanel ( ) ; currentColoringPanel = getNonePanel ( ) ; baseColorButton . setVisible ( true ) ; baseColorIndicator . setVisible ( true ) ; mainPanel . add ( currentColoringPanel ) ; } else if ( coloringMethod . getSelectedItem ( ) == "DecayTrail" ) { clearColoringPanel ( ) ; currentColoringPanel = getDecayTrailPanel ( ) ; baseColorButton . setVisible ( true ) ; baseColorIndicator . setVisible ( true ) ; mainPanel . add ( currentColoringPanel ) ; } else if ( coloringMethod . getSelectedItem ( ) == "Frequency" ) { clearColoringPanel ( ) ; currentColoringPanel = getFrequencyPanel ( ) ; baseColorButton . setVisible ( true ) ; baseColorIndicator . setVisible ( true ) ; mainPanel . add ( currentColoringPanel ) ; } pack ( ) ; setLocationRelativeTo ( null ) ; }
initialize the current coloring panel based on combo box selection .
