[Bug AWT/19849] New: Swing: ActionEvent.getActionCommand null
hendrich at informatik dot uni-hamburg dot de
gcc-bugzilla@gcc.gnu.org
Wed Feb 9 18:27:00 GMT 2005
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
More information about the Gcc-bugs
mailing list