NullPointerException when referencing a property of a JTabbedPane
<p>What is wrong with the logic behind creating a <code>JTabbedPane</code> and getting the tab count
of 11, then using a setter?</p>

<p>I try to reference the <code>tabCount</code> of the <code>SetObjects.currentJTabbedPane</code> and it throws
<code>NullPointerException</code>.</p>

<p><strong>create</strong></p>

<pre><code>jtp.setSelectedIndex(0);

int jtpCount=jtp.getTabCount();
System.out.println(C+M+AND+jtpCount+": jtpCount of The JTabbedPane created: \n");

setCurrentJTabbedPane(jtp);
int currentCount=SetObjects.currentJTabbedPane.getTabCount();
System.out.println(C+M+AND+currentCount+": currentCount for
    SetObjects.currentJTabbedPane.getTabCount() : \n");
</code></pre>

<p><strong>setter</strong></p>

<pre><code>public static void setCurrentJTabbedPane(JTabbedPane currentJTabbedPane) {
    String M =(" --&gt; in setCurrentJTabbedPane() var: &lt;-- \n");
    System.out.println(M);

    SetObjects.currentJTabbedPane = currentJTabbedPane;
    System.out.println(C+M+AND+SetObjects.currentJTabbedPane.getTabCount()+":
        SetObjects.currentJTabbedPane.getTabCount() : \n");
}
</code></pre>

<p><strong>output</strong></p>

<blockquote>
  <p>CLASS<br>
  SetObjects:<br>
  --> JTabbedPane obj() var: xxxxxxxxx : xxxxxxxx&lt;--<br>
      : 11: jtpCount of The JTabbedPane created: </p>

<pre><code>--&gt; in setCurrentJTabbedPane() var: &lt;-- 
</code></pre>
  
  <p>Exception in thread "main" java.lang.NullPointerException<br>
   at view.SetObjects.setCurrentJTabbedPane(SetObjects.java:385)<br>
   at view.SetObjects.obj(SetObjects.java:217)<br>
   at view.SchoolJDesktopPane.createInnerFrame(SchoolJDesktopPane.java:119)<br>
   at view.SchoolJDesktopPane.(SchoolJDesktopPane.java:97)<br>
   at view.Main.createJDesktopPane(Main.java:60)<br>
   at view.Main.main(Main.java:54)</p>
</blockquote>
