> Thank you so much for the instant response. It works fine for two of
> three cases. The third case still leaves me with a question. The
[quoted text clipped - 12 lines]
>> java.awt.Window::pack()
>> and Window subs
Much to my embarrassment, I tried setPreferredSize(int,int) on the
JScrollPane and assumed that the method did not exist for the class when
the compile failed. I didn't think of using a Dimension object until I
read your post. I have it working reasonably well now.
Thanks again for helping. I know this is basic stuff, but it gets
pretty frustrating sometimes.
> Preferred size of JScrollPane with JTable inside is:
>
[quoted text clipped - 21 lines]
>>> java.awt.Window::pack()
>>> and Window subs
Andrew Thompson - 22 Dec 2005 01:38 GMT
> Much to my embarrassment, I tried setPreferredSize(int,int) on the
> JScrollPane and assumed that the method did not exist for the class when
> the compile failed.
The JavaDocs (or an automplete IDE) are much handy here..
<http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JScrollPane.html>
Do a search on 'setpref', and click the link.
'Voila' - setPreferredSize inherets from JComponent and
accepts a Dimension.

Signature
Andrew Thompson
physci, javasaver, 1point1c, lensescapes - athompson.info/andrew
Roedy Green - 22 Dec 2005 08:43 GMT
>Much to my embarrassment, I tried setPreferredSize(int,int) on the
>JScrollPane and assumed that the method did not exist for the class when
>the compile failed.
setPreferredSize came in with JDK 1.5. Prior to that you must
override getPreferredSize (and brothers).

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Bill Michaelson - 23 Dec 2005 14:47 GMT
>>Much to my embarrassment, I tried setPreferredSize(int,int) on the
>>JScrollPane and assumed that the method did not exist for the class when
>>the compile failed.
>
> setPreferredSize came in with JDK 1.5. Prior to that you must
> override getPreferredSize (and brothers).
I haven't been thinking in those terms, but I'm catching on as I scrape
the rust off my Java lobe. Thanks for the clue...