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

When change menu's label, frame can not be resized.

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_2.5.1, solaris_2.6

      Description

      JDK Version: JDK-1.2beta3-F
      Locale: All
      Platform: Solaris

      When change the content of a menu's label, frame can not be resized, while in version 1.1.3, it works well.
      Following is a test source:
      ======================t7.java====================================
      import java.awt.*;


      public class t7 {
      public static void main(String args[]) {
      Frame f = new Frame("My Window");

      MenuBar mb = new MenuBar();
      Menu mn = new Menu("menu");
      MenuItem mi = new MenuItem("item");
      mn.add(mi);
      mb.add(mn);
      TextArea ta = new TextArea(10, 10);
      ta.setText("12345678");
      f.add(ta);
      f.setMenuBar(mb);

      int i = 0;
      String s = "";

      f.pack();
      f.show();

      while(true) {
      s = s + i;
      if (i == 9) {
      s = "";
      i = 0;
      }
      i++;
      try {
      mn.setLabel(s);
      Thread.sleep(600);
      } catch (Exception ex) {}
      }
      }
      }
      ====================================================================
      This program change the menu's label every a short time, but you can not
      resize the size of the frame using mose.

      jim.hu@prc 1998-02-10

        Attachments

          Activity

            People

            Assignee:
            duke J. Duke (Inactive)
            Reporter:
            jhusunw Jim Hu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: