title: Java: Getting a checkbox name from a new JFrame
body: <p>I have a JCheckBox defined as:</p>
  
  <pre><code>JCheckBox NewCB = new JCheckbox();
   NewCB.setSelected(false);
   NewCB.setMnemonic(KeyEvent.VK_C);
   NewCB.addItemListener(this);
  </code></pre>
  
  <p>This Check Box is using an ItemLisener:</p>
  
  <pre><code>public void itemStateChanged(ItemEvent e) {
  
      Object source = e.getItemSelectable();
  if(source == NewCB) {TEST = "SELECTED"; System.out.println(TEST);}
  
  }
  </code></pre>
  
  <p>I launch a JFrame when the program starts. If I add this CheckBox to the frame, it works fine. If I open a second JFrame, and add this Check Box to the 2nd frame, and the Object Source no longer works. Is there some other definition I need to make to get the Object source to read the check box name for any open frames?</p>