<Swing Dev> Bug 6491856: JTextArea incorrect preferred size

Peter Zhelezniakov Peter.Zhelezniakov at Sun.COM
Thu Mar 18 12:13:19 UTC 2010


Hi Walter,

Walter Laan wrote:
> The fix for bug 6491856 "For JTextArea the standard text terminal size
> 80x24 seems to be the reasonable default." doesn't seem to work
> correctly. When I tested it in JDK7-ea-b76 the preferred size returned
> from the example code is [width=0,height=1376] while I would expect
> [width=880,height=384] (the result of new JTextArea(24,
> 80).getPreferredScrollableViewportSize() on my system).

This is likely caused by 6925473, which is being fixed now.


> Perhaps the default [width=400,height=400] for the preferred scrollable
> viewport size when preferred size is null should be used though. The 880
> width seems a bit too wide to me - for reference 6u18 gives currently
> [width=100,height=16] for JTextArea with the sample text.

Seems a good idea, thanks!
-- 
Peter



More information about the swing-dev mailing list