Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #1137
| From | "Jason Cavett" <jason.cavett@THRWHITE.remove-dii-this> |
|---|---|
| Subject | A JLabel's Size |
| Message-ID | <1173283154.860512.281850@n33g2000cwc.googlegroups.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| Date | 2011-04-27 15:31 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui Something I'm curious about... When I create a JLabel and place it into a JPanel/JDialog/some other component, it always appears as the correct size (just large enough to display the text + appropriate boundary around the text). But, when I attempt to get that JLabel's size, it returns 0 width and 0 height unless I specifically set the size of the JLabel. Shouldn't the size have been set correctly upon the addition of the text to the label? I'm confused on how this is working and why it's working that way. --- * 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 — Next in thread | Find similar | Unroll thread
A JLabel's Size "Jason Cavett" <jason.cavett@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
Re: A JLabel's Size "Knute Johnson" <knute.johnson@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
Re: A JLabel's Size "Jason Cavett" <jason.cavett@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
Re: A JLabel's Size "A. Bolmarcich" <a..bolmarcich@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
Re: A JLabel's Size "Knute Johnson" <knute.johnson@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
csiph-web