-
Bug
-
Resolution: Fixed
-
P2
-
1.1
-
1.1beta3
-
generic, x86
-
solaris_10, windows_95, windows_nt
-
Not verified
From ###@###.### Mon Dec 30 15:42:13 1996
X-Sender: pinky@piccolo
To: java-awt@java
Subject: java.awt.MenuItem bug (?)
MIME-Version: 1.0
I am trying to use the setActionCommand method on java.awt.MenuItem, but
the ActionEvents that get generated still have the original action command
string of the MenuItem's title string instead of what I pass in as the
setActionCommand's argument.
My code is very simple:
mi = new MenuItem(m_aMsgMgrInfo[i].sItemLabel);
mi.setActionCommand("Hey you!!!"); // Integer.toString(i));
mi.addActionListener(this);
Later, I print out the ActionEvent's command string, and it contains the
label, NOT "Hey you!!!" as I would expect.
I think this is a bug, but I'm not certain.
Sincerely,
Donald Pinkston
Caltech Seismology Lab
X-Sender: pinky@piccolo
To: java-awt@java
Subject: java.awt.MenuItem bug (?)
MIME-Version: 1.0
I am trying to use the setActionCommand method on java.awt.MenuItem, but
the ActionEvents that get generated still have the original action command
string of the MenuItem's title string instead of what I pass in as the
setActionCommand's argument.
My code is very simple:
mi = new MenuItem(m_aMsgMgrInfo[i].sItemLabel);
mi.setActionCommand("Hey you!!!"); // Integer.toString(i));
mi.addActionListener(this);
Later, I print out the ActionEvent's command string, and it contains the
label, NOT "Hey you!!!" as I would expect.
I think this is a bug, but I'm not certain.
Sincerely,
Donald Pinkston
Caltech Seismology Lab
- duplicates
-
JDK-4024859 MenuItem actionCommand not passed on to ActionEvent
- Closed
-
JDK-4025118 MenuItem ActionEvent's command name is not right
- Closed