What will make it easier for us to diagnose is sending us the package that is giving you trouble. Just Zip the whole netbeans project and upload it so we can take a better look at it and see where you went wrong.

Below would be my implementation of your issue. The GUI was developed using NetBeans IDE.

[code=java]
/*

  • Main.java
  • @author mrogers
  • Created on Jun 4, 2009, 9:55:56 AM
    */
    package tabledemo;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Vector;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;

public class Main extends javax.swing.JFrame
{

Connection dbConn = null;

/** Creates new form Main */
public Main()
{
    //I like to make sure we have a DB connection before I display a full GUI.
    getConnection();
    initComponents();
}

/** This method is called from within the constructor to
 * initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {

    jPanel1 = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    tblData = new javax.swing.JTable();
    lblTitle = new javax.swing.JLabel();
    cmdClose = new javax.swing.JButton();
    cmdLoadInfo = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("Table Demo");

    jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());

    tblData.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
            {null, null, null, null},
            {null, null, null, null},
            {null, null, null, null},
            {null, null, null, null}
        },
        new String [] {
            "Title 1", "Title 2", "Title 3", "Title 4"
        }
    ));
    jScrollPane1.setViewportView(tblData);

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
        jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 516, Short.MAX_VALUE)
    );
    jPanel1Layout.setVerticalGroup(
        jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 388, Short.MAX_VALUE)
    );

    lblTitle.setText("This is a Table Demo in a Panel.");

    cmdClose.setText("Close");
    cmdClose.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cmdCloseActionPerformed(evt);
        }
    });

    cmdLoadInfo.setText("Load Info");
    cmdLoadInfo.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cmdLoadInfoActionPerformed(evt);
        } ...