File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes ScrollPane oversized for JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "ScrollPane oversized for JTable" Watch "ScrollPane oversized for JTable" New topic
Author

ScrollPane oversized for JTable

jay vas
Ranch Hand

Joined: Aug 30, 2005
Posts: 407
Hi GUys :

I have a scroll pane, holding a jtable, but the problem
is that it always has extra space added to the bottom of it.
So there is a blank grey area under the table (whose background is white). Ive tried setting the background color of the
scroll pane to pink (so that I can verify this) and the empty space
is still grey. But Im pretty sure that the grey space is the scroll pane because at the bottom of it is the scroll bar.

This seems strange .... I would think a scroll pane should be smart enought
to pack its size down just small enought to frame the size of the JTable so no extra space is taken up.

So my question is... how do you pack the contents of a scroll pane ?

Please help ?
j
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ScrollPane oversized for JTable
 
Similar Threads
How to display an image in the background of a JTable with customized rendrer?
JTable within JScrollPane
JTable "..."
Height of JTable
Swing problem with JTable