Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #11373
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Robert Klemme <shortcutter@googlemail.com> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Blocks for scope control |
| Date | Mon, 16 Jan 2012 07:59:19 +0100 |
| Lines | 32 |
| Message-ID | <9ni06jF9acU1@mid.individual.net> (permalink) |
| References | <dBCQq.122$d%2.16@newsfe07.iad> <block-20120115171817@ram.dialup.fu-berlin.de> <9ngdd9Fv6mU1@mid.individual.net> <temporary-names-20120115175901@ram.dialup.fu-berlin.de> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net xToIQORLMq8XXUr7x+SYTAmUFYdsvIxU+Z0qFlp9K9Rs2w7Lo= |
| Cancel-Lock | sha1:QuIPTLyyBXcTfAYt0Wc2qMOqDC8= |
| User-Agent | Mozilla/5.0 (Windows NT 6.0; WOW64; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 |
| In-Reply-To | <temporary-names-20120115175901@ram.dialup.fu-berlin.de> |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:11373 |
Show key headers only | View raw
On 15.01.2012 17:59, Stefan Ram wrote:
> Robert Klemme<shortcutter@googlemail.com> writes:
>>> { final Button button = new Button(); frame.add( button ); }
>> Why do you think it makes sense to replace this
>> frame.add( new Button() );
>> with the block above?
>
> This code (comments removed by me):
>
> for (ThumbnailAction thumbAction : chunks) {
> JButton thumbButton = new JButton(thumbAction);
> buttonBar.add(thumbButton, buttonBar.getComponentCount() - 1);
> }
>
> can be found in the renowned Java Tutorial at
>
> http://docs.oracle.com/javase/tutorial/uiswing/components/icon.html
>
> . So such temporary names for one-time use are not
> against common teachings.
OK, but here there are more arguments to add() and the line is longer.
That makes more sense than the original example to me.
Cheers
robert
--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Blocks for scope control Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-01-15 11:50 -0400
Re: Blocks for scope control Robert Klemme <shortcutter@googlemail.com> - 2012-01-15 17:10 +0100
Re: Blocks for scope control Robert Klemme <shortcutter@googlemail.com> - 2012-01-15 17:32 +0100
Re: Blocks for scope control Lew <noone@lewscanon.com> - 2012-01-15 11:21 -0800
Re: Blocks for scope control Robert Klemme <shortcutter@googlemail.com> - 2012-01-16 07:59 +0100
Re: Blocks for scope control markspace <-@.> - 2012-01-15 09:57 -0800
Re: Blocks for scope control Lew <noone@lewscanon.com> - 2012-01-15 11:28 -0800
Re: Blocks for scope control Lew <noone@lewscanon.com> - 2012-01-15 11:00 -0800
Re: Blocks for scope control Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-01-15 17:49 -0400
Re: Blocks for scope control Lew <noone@lewscanon.com> - 2012-01-15 15:45 -0800
Re: Blocks for scope control Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-01-19 21:54 -0400
Re: Blocks for scope control Robert Klemme <shortcutter@googlemail.com> - 2012-01-20 08:41 +0100
Re: Blocks for scope control Lew <noone@lewscanon.com> - 2012-01-20 15:24 -0800
Re: Blocks for scope control Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-01-20 19:30 -0400
Re: Blocks for scope control Lew <noone@lewscanon.com> - 2012-01-20 15:54 -0800
Re: Blocks for scope control Robert Klemme <shortcutter@googlemail.com> - 2012-01-16 07:55 +0100
Re: Blocks for scope control Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-01-19 21:16 -0400
Re: Blocks for scope control Robert Klemme <shortcutter@googlemail.com> - 2012-01-21 13:25 +0100
Re: Blocks for scope control Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-01-21 10:41 -0400
Re: Blocks for scope control Robert Klemme <shortcutter@googlemail.com> - 2012-01-22 13:03 +0100
Re: Blocks for scope control Roedy Green <see_website@mindprod.com.invalid> - 2012-01-16 06:09 -0800
Re: Blocks for scope control Henk van Voorthuijsen <voorth@xs4all.nl> - 2012-01-16 07:03 -0800
Re: Blocks for scope control Arne Vajhøj <arne@vajhoej.dk> - 2012-01-17 18:43 -0500
Re: Blocks for scope control Lew <noone@lewscanon.com> - 2012-01-20 11:05 -0800
Re: Blocks for scope control Gene Wirchenko <genew@ocis.net> - 2012-01-20 12:11 -0800
Re: Blocks for scope control Arne Vajhøj <arne@vajhoej.dk> - 2012-02-06 21:24 -0500
csiph-web