-
Bug
-
Resolution: Fixed
-
P3
-
1.2.0
-
None
-
1.2fcs
-
generic, sparc
-
generic, solaris_2.6
-
Not verified
The latest JDK1.2-Swing workspace contains a bug in the Action plumbing. The Motif L&F MotifInternalFrameTitlePane makes use of a SystemMenu with the following code which until now, did not need the explicit call to setActionCommand(), and the automatic registration of the action command via the JMenuItem and listener works fine.
JMenuItem mi = (JMenuItem) systemMenu.add(new JMenuItem("Restore"));
mi.setEnabled(false);
mi.addActionListener(this);
mi.setActionCommand("Restore");
/// PENDING(klobad) Move/Size actions on InternalFrame need to be determined
mi = (JMenuItem) systemMenu.add(new JMenuItem("Move"));
mi.setEnabled(false);
mi.addActionListener(this);
mi.setActionCommand("Move");
mi = (JMenuItem) systemMenu.add(new JMenuItem("Size"));
mi.setEnabled(false);
mi.addActionListener(this);
mi.setActionCommand("Size");
mi = (JMenuItem) systemMenu.add(new JMenuItem("Minimize"));
mi.addActionListener(this);
mi.setActionCommand("Minimize");
mi = (JMenuItem) systemMenu.add(new JMenuItem("Maximize"));
mi.addActionListener(this);
mi.setActionCommand("Maximize");
systemMenu.add(new JSeparator());
mi = (JMenuItem) systemMenu.add(new JMenuItem("Close"));
mi.addActionListener(this);
mi.setActionCommand("Close");
- duplicates
-
JDK-4156302 ActionEvent.getActionCommand() returns null
-
- Closed
-