problem in scrolling jtable
<p>I'm putting the table in JScrollPane, but my table is not supporting vertical scrollable...if anyone can tell me where I'm going wrong.
Here is my code..</p>

<pre><code>PreparedStatement pst=c1.prepareStatement("select * from entry where  visit_to_person=?");
            pst.setString(1,visit_combo.getSelectedItem().toString());
            ResultSet rs =pst.executeQuery();
                            while(rs.next())
                        {

                            vno= rs.getString(1);
                            vnam=rs.getString(2);
                            vtp=rs.getString(3);
                            pur=rs.getString(4);
                            in=rs.getString(5);
                            dat=rs.getString(6);
                            String s[]={vno,vnam,vtp,pur,in,dat};
                            Vector coldata=new Vector(Arrays.asList(s));
                            rowdata.add(coldata);
                        }
                String[] head={"VISITOR NO","VISITOR NAME","VISIT TO PERSON","PURPOSE","IN TIME","DATE"};
            colname=new Vector(Arrays.asList(head));
                tableModel =new DefaultTableModel(rowdata, colname);
                table = new JTable(tableModel);
//                table.isCellEditable(i, n);
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        JTableHeader header = table.getTableHeader();
        JScrollPane pane = new JScrollPane(table);
                pane.setAutoscrolls(true);
                pane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
                pane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
                pane.setSize(450,300);
                pane.setVisible(true);

        panel.add(pane,BorderLayout.CENTER);
                JFrame.setDefaultLookAndFeelDecorated(true);

         }
</code></pre>

<p><strong>i hope to get a reply soon</strong></p>
