This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug AWT/19849] New: Swing: ActionEvent.getActionCommand null
- From: "hendrich at informatik dot uni-hamburg dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Feb 2005 13:05:09 -0000
- Subject: [Bug AWT/19849] New: Swing: ActionEvent.getActionCommand null
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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