How to Instantiate Java Class of Swing Components Multiple Times
<p>I have a java class being used as a container, it is coded to have a <strong>JPanel</strong> and a <strong>TabbedPane</strong></p>

<p>I have another java class that builds a <strong>JPanel</strong> containing <strong>JLabel</strong>s and <strong>JTextField</strong>s that I want added to the TabbedPane of the container class.  I want a new instance of the class that adds the JPanel, so I can add multiple tabs to the container class.</p>

<p>I have reviewed the following: <a href="https://stackoverflow.com/questions/4344214/can-we-reuse-java-swing-application-components-in-other-instances-of-same-applic">Can we reuse Java Swing application components in other instances of same application?</a>, <a href="https://stackoverflow.com/questions/6520773/multiple-instances-of-model-components-in-java-swing">Multiple instances of model components in Java Swing?</a>, <a href="https://stackoverflow.com/questions/25116722/multiple-instance-of-one-jframe">Multiple instance of ONE JFrame</a>, and multiple web authors.  I am not a student doing an assignment, I am an old dude, new to Java, moving my top-down skills to OOP.</p>

<p>Here is my code:</p>

<pre><code>import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import javax.swing.border.EmptyBorder;

@SuppressWarnings("serial")
public class TestContainer extends JFrame {

private JPanel contentPane;
public static JTabbedPane tabbedPane1;

/**
 * Launch the application.
 */
public static void main(String[] args) {
    EventQueue.invokeLater(new Runnable() {
        @Override
        public void run() {
            try {
                TestContainer frame = new TestContainer();
                frame.setVisible(true);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    });
}

/**
 * Create the frame.
 */
public TestContainer() {

    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setBounds(100, 100, 450, 300);
    contentPane = new JPanel();
    contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
    setContentPane(contentPane);
    contentPane.setLayout(null);

    JScrollPane scrollBasePane = new JScrollPane();
    scrollBasePane.setBounds(10, 11, 414, 239);
    contentPane.add(scrollBasePane);

    JPanel panelBase = new JPanel();
    scrollBasePane.setViewportView(panelBase);
    panelBase.setLayout(null);

    tabbedPane1 = new JTabbedPane(JTabbedPane.TOP);
    tabbedPane1.setBounds(10, 11, 392, 215);
    panelBase.add(tabbedPane1);

    // add new JPanel to TabbedPane via a reusable Class
    MoreTabs mt1 = new MoreTabs();

    tabbedPane1.addTab( mt1() ); //non-static
    }
 }
</code></pre>

<p>And</p>

<pre><code>import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class MoreTabs{

private JPanel panel = new JPanel();
private JLabel lblPutStuffOn = new JLabel("Put stuff on this panel, T3-MoreTabs.");
private JTextField text = new JTextField();

panel.add(lblPutStuffOn);
panel.add(text);

public String getLblText() {
    String lblText;
    lblText = lblPutStuffOn.getText();
    return lblText;
}

public void setLblText(String s){
    lblPutStuffOn.setText(s);
}

public String getTxtText() {
    String txtText;
    txtText = text.getText();
    return txtText;
}

public void setTxtText(String s){
    text.setText(s);
  }

}
</code></pre>