Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #305
| From | "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: Wrap text dont ajust |
| Message-ID | <1165082996.192642.133590@73g2000cwn.googlegroups.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <1165068982.754454.206730@j44g2000cwa.googlegroups.com><1 |
| Date | 2011-04-27 15:26 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui Paulo Filipe wrote: ... > why the width was set to 20? How did you get this specific number? The only specific thing about it is that it is 'smaller than the size set for its container' which encourages the lines to wrap. It might have been '99', given the frame was 100. The layout (BorderLayout.CENTER) was always going to ensure that it expanded to fill the available space. Note that if you remove the ..overriden getPreferredSize, the JScrollPane and the and the setSize on the frame, the GUI should end up the exact correct size to display the text, but it will again suffer the 'very wide text' syndrome.. > Was this that solve the problem? Or was this more the use of pack()? Always, always, always* use pack(). * Except/until if you can justify why it is a good idea *not* to. > Thanks again for the help, hope i'm not abusing the patience :) ...hmm. Don't forget to be reading those JavaDocs. Andrew T.. --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next — Previous in thread | Find similar
Wrap text dont ajust heig "Paulo Filipe" <paulo.filipe@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: Wrap text dont ajust "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: Wrap text dont ajust "Paulo Filipe" <paulo.filipe@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: Wrap text dont ajust "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: Wrap text dont ajust "Paulo Filipe" <paulo.filipe@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: Wrap text dont ajust "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
csiph-web