How to show put JTable in a JScrollPane ?
I want to make my JTable, so it can has scrollbar (horizontal and vertical).
I have tried :
SpringLayout layout =new SpringLayout();
//==========================================================
Table_Data =new JTable(sData, sHeader);
Table_Data.setPreferredScrollableViewportSize(new Dimension(300, 100));
ScrollPane_Table =new JScrollPane(Table_Data);
//==========================================================
Panel_Data =new JPanel(layout);
Panel_Data.setPreferredSize(new Dimension(300,100));
Panel_Data.setBorder(BorderFactory.createLoweredBevelBorder());
Panel_Data.add(ScrollPane_Table);
//==========================================================
but still, the JTable doesn't have any scrollbar.
2ndly, how to make the JTable so it can auto adjust for the column width ? Because, my some of my JTable header show "abc..." and I have to adjust it manually 1 by 1.
Thank you

