private void colButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_colButtonActionPerformed

        Color current = bgColButton.getBackground();

        if (evt.getSource() == recordColButton) { 
            current = recordColButton.getBackground();
        }
        else if (evt.getSource() == axisColButton) { 
            current = axisColButton.getBackground();
        }
        else if (evt.getSource() == brushColButton) { 
            current = brushColButton.getBackground();
        } 

        // Bring up a color chooser 
        Color c = JColorChooser.showDialog(this, "Choose Color", current); 

        if (evt.getSource() == bgColButton) { 
            bgColButton.setBackground(c);
            parent.setBackground(c);
        }
        else if (evt.getSource() == recordColButton) { 
            recordColButton.setBackground(c);
            parent.setPreference("recordColor", c);
        }
        else if (evt.getSource() == axisColButton) { 
            axisColButton.setBackground(c);
            parent.setForeground(c);
        }
        else { 
            brushColButton.setBackground(c);
            parent.setPreference("brushColor", c);
        } 
    }//GEN-LAST:event_colButtonActionPerformed