title: Change Font color of textfield input via JCheckBox
body: <p>I'm making an address book and I'd like for the user to be able to color code their contacts [such as all 'friends' are printed in blue font, all family are green, etc.] I added checkboxes and I'm adding action listeners. However, I am getting a compilation error.</p>
  
  <pre><code>    friend = new JCheckBox("Friend");
      coWorker = new JCheckBox("Business");
      family = new JCheckBox("Family");
      miscellaneous = new JCheckBox("Miscellaneous");
  
  
  jPanel4.add(friend);
      jPanel4.add(coWorker);
      jPanel4.add(family);
      jPanel4.add(miscellaneous);
  
      HandlerClass handler = new HandlerClass();
      friend.addItemListener(handler);
      coWorker.addItemListener(handler);
      family.addItemListener(handler);
      miscellaneous.addItemListener(handler);
  
  
  jButton1.addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent e) {
              AddressBookMain.addEntry(new AddressBook(jTextField1.getText(), jTextField2.getText(), jTextField3.getText(), jTextField4.getText()));
          }
      });
  
  `private class HandlerClass implements ItemListener {
      public void itemStateChanged(ItemEvent event) {
          jTextField1.setFont(Color.BLUE);
  
      }
  
  }`
  </code></pre>