Why do you have a separate method to add the text area to the panel?
I'm guessing the problem is that the tab is made visible BEFORE you add the text area to the panel on the tab. So you need to do one of two things:
Invoke revalidate() and repaint() on the panel after you add the text area to the panel
Keep you code for creating the panel in one place. That is create the panel and the label and the text area to the panel at the same time. This is the easy solution from a code design.
Edit
The GroupLayout is causing a problem. I changed the following:
/*
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(tabbedPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 781, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(tabbedPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 437, Short.MAX_VALUE))
);
pack();
*/
add(tabbedPanel);
setSize(400, 400);
So that the frame just used the default BorderLayout and the tabbed pane will be added to the CENTER.
I then changed the panel to use the default FlowLayout:
//pan.setLayout(new GridLayout(20,20));
and the text area now displays. I suggest you build GUI's manually to better understand how layout managers work.