private void clearColoringPanel(){
  if (currentColoringPanel != null) {
    mainPanel.remove(currentColoringPanel);
  }
}

private void clearColoringPanel ( ) { if ( currentColoringPanel != null ) { mainPanel . remove ( currentColoringPanel ) ; } }
clear the current coloring panel if null .
