title: Trying to add a JFrame through a action listener button JAVA Swing GUI
body: <p>When the user check marks the "Character" checkbox, and then when they hit enter it should add a JFrame, but for some reason it doesn't do anything. Help please!</p>
  
  <pre><code>  check1.addActionListener(
              new ActionListener() {
                 public void actionPerformed(ActionEvent e) {
                    chars = true;
                 }
              });
  
    enter.addActionListener(
              new ActionListener() {
                 public void actionPerformed(ActionEvent e) {
  
                    if(chars == true){
                       character = new JLabel("characters");
                       outputDisplay.add(character);
                       leftside.add(outputDisplay);
                    }
                    displayData();
                 }
              });
  </code></pre>