Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4156026

Action Command defaults are not working

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.2.0
    • 1.2.0
    • client-libs
    • 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");

            gsaab Georges Saab
            rschiavisunw Richard Schiavi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: