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; 5+ 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] 5+ messages in thread

* [Bug AWT/19849] Swing: ActionEvent.getActionCommand null
  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 ` hendrich at informatik dot uni-hamburg dot de
  2005-02-12 22:35 ` [Bug SWING/19849] " pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: hendrich at informatik dot uni-hamburg dot de @ 2005-02-09 13:58 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From hendrich at informatik dot uni-hamburg dot de  2005-02-09 13:05 -------
Created an attachment (id=8156)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8156&action=view)
testcase for the bug, run with gcj and java for comparison.


-- 


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug SWING/19849] Swing: ActionEvent.getActionCommand null
  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 ` 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
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-12 22:35 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-12 22:34 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|AWT                         |SWING
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-02-12 22:34:46
               date|                            |
            Summary|Swing:                      |Swing:
                   |ActionEvent.getActionCommand|ActionEvent.getActionCommand
                   |null                        |null


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug SWING/19849] Swing: ActionEvent.getActionCommand null
  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
  3 siblings, 0 replies; 5+ messages in thread
From: roman at kennke dot org @ 2005-06-03 14:53 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From roman at kennke dot org  2005-06-03 14:53 -------
I have checked in a fix for this some days ago on GNU Classpath CVS. If that is
merged into GCJ, this could be closed.

-- 


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug swing/19849] Swing: ActionEvent.getActionCommand null
  2005-02-09 13:52 [Bug AWT/19849] New: Swing: ActionEvent.getActionCommand null hendrich at informatik dot uni-hamburg dot de
                   ` (2 preceding siblings ...)
  2005-06-03 14:53 ` roman at kennke dot org
@ 2005-08-24 19:29 ` fitzsim at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: fitzsim at redhat dot com @ 2005-08-24 19:29 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From fitzsim at redhat dot com  2005-08-24 19:29 -------
Fixed.  Closing.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-08-24 19:29 UTC | newest]

Thread overview: 5+ 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

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).