title: How to call the java swing jpanel from another class method in netbeans?
body: <p>I have a Jpanel and I have to call this Jpanel from a class which have the main method. I have called the jpanel method inside my main method. But it not displaying. So how to do it in netbeans?</p>
  
  <pre><code>public class A
  {
  
   public static void main(String[] args)
      {
          // TODO code application logic here
  
         B b=new B();
         b.caller();
  
      }
  
  }
  </code></pre>
  
  <p>Jpanel Class:</p>
  
  <pre><code>class B extends Jpanel{
  
  
      public void caller()
      {
  
  
      initComponents();
      }
  
    }
  </code></pre>
  
  <p>where init component method is private.So I called this from another method inside the class which is public but nothing working. Help to  solve this in netbeans</p>