public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug AWT/19849] New: Swing: ActionEvent.getActionCommand null
@ 2005-02-09 13:52 hendrich at informatik dot uni-hamburg dot de
  2005-02-09 13:58 ` [Bug AWT/19849] " hendrich at informatik dot uni-hamburg dot de
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: hendrich at informatik dot uni-hamburg dot de @ 2005-02-09 13:52 UTC (permalink / raw)
  To: java-prs

In order to avoid the overhead of individual event-listeners for every
button or menu-item, my application uses a central ActionListener which
uses ActionEvent.getActionCommand() to distinguish between the several
(hundred) event sources.

Unfortunately, ActionEvents created by Swing components in libgcj always 
return null for getActionCommand(). Testing with the JDKs (1.1 .. 5.0) 
reveals, that the JDKs return getText() for standard AbstractButtons like 
JButton or JMenuItem. I suggest that gcj also returns the value of getText() 
for these components.

See attached testcase; compile and run with gcj and a JDK/JRE for comparison.

-- 
           Summary: Swing: ActionEvent.getActionCommand null
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: AWT
        AssignedTo: fitzsim at redhat dot com
        ReportedBy: hendrich at informatik dot uni-hamburg dot de
                CC: fitzsim at redhat dot com,gcc-bugs at gcc dot gnu dot
                    org,java-prs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19849


^ permalink raw reply	[flat|nested] 6+ messages in thread
[parent not found: <bug-19849-9150@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2005-10-16  1:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-09 13:52 [Bug AWT/19849] New: Swing: ActionEvent.getActionCommand null hendrich at informatik dot uni-hamburg dot de
2005-02-09 13:58 ` [Bug AWT/19849] " hendrich at informatik dot uni-hamburg dot de
2005-02-12 22:35 ` [Bug SWING/19849] " pinskia at gcc dot gnu dot org
2005-06-03 14:53 ` roman at kennke dot org
2005-08-24 19:29 ` [Bug swing/19849] " fitzsim at redhat dot com
     [not found] <bug-19849-9150@http.gcc.gnu.org/bugzilla/>
2005-10-16  1:48 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).