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

fp.bugs 3481 win32: MenuItem.setLabel doesn't change label on peer

XMLWordPrintable

    • 1.1
    • sparc
    • solaris_2.5
    • Not verified


      From: Nick Roberts <###@###.###>
      This does not look like form output to me.


      JDK version 1.0
       Win32
       The setLabel method of java.awt.MenuItem does not change the displayed
       text, the label reported by getLabel does change.

       In the Beta-1 AWT source which we licensed the setLabel method in the
       MenuItem Win32 peer is not implemented. I presume this remains the case
       in JDK-1.0 as the problem remains.

       Nick Roberts
       SilverPlatter Information

      [aim 6/13/96]
      I added a test case:

      import java.awt.*;

      public class MenuLabel extends Frame{

          MenuItem mitem;

          public MenuLabel() {
      super("Menu Label Test");

      MenuBar mb = new MenuBar();
      setMenuBar(mb);

      Menu m = new Menu("File");
      mb.add(m);
      mitem = new MenuItem("Open");
      m.add(mitem);
      m.add("Change Label..");

      pack();
      show();
          }

          public boolean action(Event evt, Object arg) {
      if (arg.equals("Change Label..")) {
      mitem.setLabel("Save");
      return true;
      }
      return false;
          }

          public static void main(String[] args) {
      new MenuLabel();
          }
      }

            tballsunw Tom Ball (Inactive)
            bhagen Benjamin Hagen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: