Skip to main content

JScrollPane JTable columns auto resizing incorrectly

No replies
hari515
Offline
Joined: 2007-02-26

I don't know what the reason is,

Let me explain the issue in a little detail..

I have a JScrollPane in which I set a JPanel as viewport, a JTabbedPane as columnHeader and a JTable as it's rowHeader, and this JTable's tableHeader as the UPPER_LEFT_CORNER.
The viewport panel has card layout, and some 5 tables as cards; The column header tabbed pane has 5 tabs made of the table headers of the tables in the cardPanel.

I'm showing different cards based on the tab selections in the columnHeader tabbed pane.

Now when I try to resize the columns in each of the tabs, I get a horizantal scroll bar for the viewport and the column headers automatically getting resized while the mouse is still being dragged over the column header. This is not happening everytime.

I tried to set setAutoScrolls to false on the scrollpane and tables but it didn't work.

Can someone help me please...

Thanks,
Hari