Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.glorb.com!postnews.google.com!m4g2000pri.googlegroups.com!not-for-mail From: wee Newsgroups: comp.lang.java.programmer Subject: event listener Date: Mon, 8 Aug 2011 17:17:00 -0700 (PDT) Organization: http://groups.google.com Lines: 10 Message-ID: <2e38eb6a-a835-4fdf-bebe-5fc2b4f17333@m4g2000pri.googlegroups.com> NNTP-Posting-Host: 112.205.59.91 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1312849116 19672 127.0.0.1 (9 Aug 2011 00:18:36 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 9 Aug 2011 00:18:36 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: m4g2000pri.googlegroups.com; posting-host=112.205.59.91; posting-account=r7NGIQoAAABjIHboutEknxVb7HhvpL_K User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESNKRC X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0,gzip(gfe) Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6885 hi, i have a JButton object and i added an actionListener to it. it works well with a mouse click, but if i use the enter key while the focus is on the JButton, nothing happens. do i need to add a keypress listener on top of the actionListener to the JButton so that it would work both for a keypress and a mouse click? help on this query is greatly appreciated. thanks..