From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13714 invoked by alias); 9 Feb 2005 13:05:10 -0000 Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org Received: (qmail 13691 invoked by uid 48); 9 Feb 2005 13:05:09 -0000 Date: Wed, 09 Feb 2005 13:52:00 -0000 From: "hendrich at informatik dot uni-hamburg dot de" To: java-prs@gcc.gnu.org Message-ID: <20050209130505.19849.hendrich@informatik.uni-hamburg.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug AWT/19849] New: Swing: ActionEvent.getActionCommand null X-Bugzilla-Reason: CC X-SW-Source: 2005-q1/txt/msg00312.txt.bz2 List-Id: 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