JTable and its JScrollPane

HiI'm trying to create a jTable but without the scrollpane, what i need is that the JScrollpane is the exact size of the table, the table size is not fixed. I tried taking the jtable out of the jscrollpane, but without jscrollpane, it does not show the header. Any help on this?
[293 byte] By [Leandro.Fonsecaa] at [2007-10-3 6:11:00]
# 1
Create a JPanel with a BorderLayout. Add the JTable at CENTER and the header at PAGE_START.
itchyscratchya at 2007-7-15 0:54:31 > top of Java-index,Desktop,Core GUI APIs...
# 2
table.setPreferredScrollableViewportSize(table.getPreferredSize());
camickra at 2007-7-15 0:54:31 > top of Java-index,Desktop,Core GUI APIs...
# 3
thanks for the help
Leandro.Fonsecaa at 2007-7-15 0:54:31 > top of Java-index,Desktop,Core GUI APIs...