Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #35064
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: What do you think of my CropImage class |
| Date | 2016-07-21 14:24 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <nmr413$a3q$1@dont-email.me> (permalink) |
| References | <87twfk93vu.fsf@Equus.decebal.nl> <8737n36ucx.fsf@Equus.decebal.nl> <nmqj30$boh$1@dont-email.me> <878twu6i0l.fsf@Equus.decebal.nl> <e5b9e305-d209-436d-9885-925ae416aada@googlegroups.com> |
On 7/21/2016 1:25 PM, Eric Douglas wrote:
> On Thursday, July 21, 2016 at 1:14:08 PM UTC-4, Cecil Westerhof wrote:
>>
>
> I never or rarely use pack, though many examples on the web do. It automatically sets the size and location of your controls based on their size values, the layout, and the other controls on the same pane. In our application that's irrelevant since we use non-resizeable windows and fixed locations and widths. The pack values have to do with one of the sizes (each control has getSize(), getPreferredSize(), getMinimumSize(), getMaximumSize()) and whether the control is visible.
When (non-null) layout managers are in use, pack() causes them all
to do their thing, establishing the positions and sizes of the contents
they manage. If you're using absolute positioning instead of layout
managers, I suppose pack() can be dispensed with. ("I suppose," because
I've never been 100% confident that I understand why both pack() and
validate() exist; there may be things going on that I don't know about.)
... but I'd use it anyhow, because even if *my* component uses no
layout manager, something I embed in it might. For example, a JSpinner
has assorted sub-bits and sub-pieces, uses its own layout manager to
size and position them. I'm not sure what happens if you try to
display a JSpinner that's never been pack()ed; it might well depend on
the look-and-feel in force.
--
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
What do you think of my CropImage class Cecil Westerhof <Cecil@decebal.nl> - 2016-07-20 09:15 +0200
Re: What do you think of my CropImage class Cecil Westerhof <Cecil@decebal.nl> - 2016-07-20 11:12 +0200
Re: What do you think of my CropImage class Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2016-07-20 10:02 -0700
Re: What do you think of my CropImage class Cecil Westerhof <Cecil@decebal.nl> - 2016-07-20 21:14 +0200
Re: What do you think of my CropImage class Eric Douglas <e.d.programmer@gmail.com> - 2016-07-20 12:50 -0700
Re: What do you think of my CropImage class Cecil Westerhof <Cecil@decebal.nl> - 2016-07-21 12:11 +0200
Re: What do you think of my CropImage class Cecil Westerhof <Cecil@decebal.nl> - 2016-07-21 14:19 +0200
Re: What do you think of my CropImage class Qu0ll <qu0ll64@gmail.com> - 2016-07-21 05:53 +1000
Re: What do you think of my CropImage class Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2016-07-20 13:46 -0700
Re: What do you think of my CropImage class Eric Douglas <e.d.programmer@gmail.com> - 2016-07-20 13:59 -0700
Re: What do you think of my CropImage class Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2016-07-20 15:40 -0700
Re: What do you think of my CropImage class Cecil Westerhof <Cecil@decebal.nl> - 2016-07-21 12:27 +0200
Re: What do you think of my CropImage class Eric Douglas <e.d.programmer@gmail.com> - 2016-07-21 05:17 -0700
Re: What do you think of my CropImage class Cecil Westerhof <Cecil@decebal.nl> - 2016-07-21 17:43 +0200
Re: What do you think of my CropImage class Eric Douglas <e.d.programmer@gmail.com> - 2016-07-21 08:59 -0700
Re: What do you think of my CropImage class Cecil Westerhof <Cecil@decebal.nl> - 2016-07-21 19:10 +0200
Re: What do you think of my CropImage class Arne Vajhøj <arne@vajhoej.dk> - 2016-07-23 21:47 -0400
Re: What do you think of my CropImage class Eric Douglas <e.d.programmer@gmail.com> - 2016-07-25 04:51 -0700
Re: What do you think of my CropImage class Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2016-07-25 15:01 -0700
Re: What do you think of my CropImage class Arne Vajhøj <arne@vajhoej.dk> - 2016-07-25 21:06 -0400
Re: What do you think of my CropImage class Arne Vajhøj <arne@vajhoej.dk> - 2016-07-25 21:09 -0400
Re: What do you think of my CropImage class Nigel Wade <nmw@local.domain> - 2016-07-21 15:44 +0100
Re: What do you think of my CropImage class Cecil Westerhof <Cecil@decebal.nl> - 2016-07-21 17:46 +0200
Re: What do you think of my CropImage class Cecil Westerhof <Cecil@decebal.nl> - 2016-07-21 12:25 +0200
Re: What do you think of my CropImage class Cecil Westerhof <Cecil@decebal.nl> - 2016-07-21 14:16 +0200
Re: What do you think of my CropImage class Cecil Westerhof <Cecil@decebal.nl> - 2016-07-21 12:05 +0200
Re: What do you think of my CropImage class Cecil Westerhof <Cecil@decebal.nl> - 2016-07-21 13:23 +0200
Re: What do you think of my CropImage class Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2016-07-21 07:58 -0700
Re: What do you think of my CropImage class Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-07-21 11:13 -0400
Re: What do you think of my CropImage class Cecil Westerhof <Cecil@decebal.nl> - 2016-07-21 18:12 +0200
Re: What do you think of my CropImage class Cecil Westerhof <Cecil@decebal.nl> - 2016-07-21 17:49 +0200
Re: What do you think of my CropImage class Cecil Westerhof <Cecil@decebal.nl> - 2016-07-21 11:58 +0200
Re: What do you think of my CropImage class Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-07-21 09:35 -0400
Re: What do you think of my CropImage class Eric Douglas <e.d.programmer@gmail.com> - 2016-07-21 09:03 -0700
Re: What do you think of my CropImage class Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-07-21 12:39 -0400
Re: What do you think of my CropImage class Cecil Westerhof <Cecil@decebal.nl> - 2016-07-21 18:07 +0200
Re: What do you think of my CropImage class Nigel Wade <nmw@local.domain> - 2016-07-21 17:23 +0100
Re: What do you think of my CropImage class Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-07-21 12:56 -0400
Re: What do you think of my CropImage class Cecil Westerhof <Cecil@decebal.nl> - 2016-07-21 19:03 +0200
Re: What do you think of my CropImage class Eric Douglas <e.d.programmer@gmail.com> - 2016-07-21 10:25 -0700
Re: What do you think of my CropImage class Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-07-21 14:24 -0400
Re: What do you think of my CropImage class Eric Douglas <e.d.programmer@gmail.com> - 2016-07-21 11:54 -0700
Re: What do you think of my CropImage class Cecil Westerhof <Cecil@decebal.nl> - 2016-07-21 20:25 +0200
Re: What do you think of my CropImage class Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-07-21 15:37 -0400
Re: What do you think of my CropImage class Martin Gregorie <martin@address-in-sig.invalid> - 2016-07-21 21:30 +0000
Re: What do you think of my CropImage class Cecil Westerhof <Cecil@decebal.nl> - 2016-07-21 23:52 +0200
Re: What do you think of my CropImage class Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-07-21 20:35 -0400
Re: What do you think of my CropImage class Cecil Westerhof <Cecil@decebal.nl> - 2016-07-22 04:21 +0200
Re: What do you think of my CropImage class Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-07-21 22:44 -0400
Re: What do you think of my CropImage class Cecil Westerhof <Cecil@decebal.nl> - 2016-07-22 10:27 +0200
Re: What do you think of my CropImage class Martin Gregorie <martin@address-in-sig.invalid> - 2016-07-22 10:47 +0000
Re: What do you think of my CropImage class Eric Douglas <e.d.programmer@gmail.com> - 2016-07-22 05:16 -0700
Re: What do you think of my CropImage class Nigel Wade <nmw@local.domain> - 2016-07-22 15:10 +0100
Re: What do you think of my CropImage class Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2016-07-22 07:47 -0700
Re: What do you think of my CropImage class Eric Douglas <e.d.programmer@gmail.com> - 2016-07-22 10:21 -0700
Re: What do you think of my CropImage class Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2016-07-21 08:30 -0700
Re: What do you think of my CropImage class Cecil Westerhof <Cecil@decebal.nl> - 2016-07-21 18:19 +0200
Re: What do you think of my CropImage class Eric Douglas <e.d.programmer@gmail.com> - 2016-07-21 10:18 -0700
Re: What do you think of my CropImage class Cecil Westerhof <Cecil@decebal.nl> - 2016-07-21 20:12 +0200
csiph-web