Path: csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Steven Simpson Newsgroups: comp.lang.java.programmer Subject: Re: Problem getting the JPopupMenu from the Action it generates Date: Thu, 14 Aug 2014 09:54:12 +0100 Organization: A noiseless patient Spider Lines: 13 Message-ID: References: <66hrbb-0uo.ln1@s.simpson148.btinternet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: mx05.eternal-september.org; posting-host="ad866721478175d36b4004c465aab468"; logging-data="29371"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+yEZov3+vjj6BBIo5DZc9BnXD5OVSp6uk=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 In-Reply-To: Cancel-Lock: sha1:AykHSsYZX9yHk6jYi1p1kJRYqsg= Xref: csiph.com comp.lang.java.programmer:29662 On 13/08/14 16:43, Knute Johnson wrote: > I'm curious though, how did you figure out that the JPoupMenu$1 was > the JMenuItem? The add(Action) documentation stated that some JMenuItem was created, added and returned, and that should have been the event source. The error reported that its type was JPopupMenu$1, therefore JPopupMenu$1 extends JMenuItem. The source code confirmed this. -- ss at comp dot lancs dot ac dot uk