title: Enabling a Scrollable box if a checked box has been ticked
body: <p>What i want is to happen is a Scrollable box be made visible when two check boxes have been selected</p>
  
  <pre><code>    JPanel panel = new JPanel();
      panel.setBounds(10, 10, 5, 3);//pos is temp
      contentPane.add(panel);
  
      JScrollPane scrollPane = new JScrollPane();
      panel.add(scrollPane);
  </code></pre>
  
  <p>and in the box the user should be able to input a number. </p>
  
  <p>so what i did for that was to add a box inside the scroll pane and setting the visibility to false.</p>
  
  <pre><code>    JScrollPane scrollPane = new JScrollPane();
      textField = new JTextField();
      scrollPane.add(textField);
      textField.setColumns(6);
      panel.add(scrollPane);
      panel.setVisible(false);
  </code></pre>
  
  <p>but the text field does not show.</p>
  
  <p>And also a listener</p>
  
  <pre><code>    ActionListener al = (ActionEvent e) -&gt; {
          if (e.getSource() == chA || e.getSource() == chB) {
              chckbx1.setEnabled(true);
              //setting the panel to visible when box a or B and chckbx1 has been selected 
              if (e.getSource() == chckbx1) {
                  panel.setVisible(true);
  
              }
          }
      };
      chA.addActionListener(al);
      chB.addActionListener(al);
  </code></pre>
  
  <p>but atm this doesn't work, i anyone could kindly help i would be grateful.</p>
  
  <p>Here is a link to the full code >> <a href="http://pastebin.com/v689BB8A" rel="nofollow">http://pastebin.com/v689BB8A</a></p>