title: Hide tab from JTabbedPane
body: <p>I'm using Netbeans gui to create a simple app.</p>
  
  <p>This is my structure (the layout is <strong>free design</strong> ):</p>
  
  <p><img src="https://i.stack.imgur.com/6yqWH.png" alt="enter image description here"></p>
  
  <p>Basically I have 3 tabs and want to hide one of them (the select one in the image) based on a condition. Something like if the user as some privileges show that tab, otherwise don't show that tab.</p>
  
  <p>On my code I've tried;</p>
  
  <pre><code> if (userRole == 1){
      pnlAdiconarSala.setVisible(false);
   }
  </code></pre>
  
  <p>but this tab is always showing.</p>
  
  <p>With my implementation, can I hide the tab?</p>