Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #5490

Re: actionListener vs. action

Path csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Knute Johnson <nospam@rabbitbrush.frazmtn.com>
Newsgroups comp.lang.java.gui
Subject Re: actionListener vs. action
Date Thu, 25 Feb 2016 21:15:03 -0800
Organization A noiseless patient Spider
Lines 36
Message-ID <naomr2$1jl$1@dont-email.me> (permalink)
References <97d6e7d8-df96-4534-80c2-4d19e63a9b76@googlegroups.com> <actionListener-20160226032244@ram.dialup.fu-berlin.de>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 8bit
Injection-Date Fri, 26 Feb 2016 05:12:03 -0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="e4bb2c7dad0e79edbbf184ec68513a50"; logging-data="1653"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/qqRLtJJ0FntSDWVx2FsdU"
User-Agent Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0
In-Reply-To <actionListener-20160226032244@ram.dialup.fu-berlin.de>
Cancel-Lock sha1:yic4LGviDibeqpxPwyO0eBoRnEo=
Xref csiph.com comp.lang.java.gui:5490

Show key headers only | View raw


On 2/25/2016 18:23, Stefan Ram wrote:
> phpete48@gmail.com writes:
>> I'm trying to clearly delineate actionListener and action.
>> Could someone please concisely compare the two.
>
>    These are two identifiers. Both Camel Case. »actionListener«
>    has 14 characters and consists of two English words. »action«
>    has  6 characters and consists of one English word.
>
>    The following program shows how they can be used in a program:
>
> public class Main
> { public static void main(String args[]) throws Exception
>    { final int actionListener = 8;
>      final int action         = 4;
>      System.out.println( actionListener + action ); }}
>
> 12
>
>> Also, under which conditions should you use one over the other.
>
>    Use the identifier »actionListener« to name something that
>    is listening to/for an action. (Usually this is not an »int«
>    as in the above program. This program was just an example.)
>
>    Use the identifier »action« to name something that is an
>    action itself. Something that does not just /listen/ to an
>    action, but /is/ an action!
>

Bored tonight are we Stefan?


-- 

Knute Johnson

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

actionListener vs. action phpete48@gmail.com - 2016-02-25 10:59 -0800
  Re: actionListener vs. action Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2016-02-25 13:16 -0800
  Re: actionListener vs. action Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2016-02-25 21:15 -0800
    Re: actionListener vs. action Jeff Higgins <jeff@invalid.invalid> - 2016-02-27 05:08 +0000

csiph-web