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

motif awt's CheckBox.setLabel doesn't always work

    Details

    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_2.5

      Description

      If you create an awt Checkbox with the constructor that takes no arguments, and after it's been created, set its label with setLabel, the label won't be set correctly.

      Here's sample code that demonstrates the problem:

      import java.awt.*;

      public class BadCheckbox extends Frame
      {
      public static void main(String args[])
      {
      BadCheckbox f = new BadCheckbox();
      f.pack();
      f.show();
      f.changelabel();
      }

      Checkbox goodcheck, badcheck;
      public BadCheckbox()
      {
      super("Bad check box demo");
      goodcheck = new Checkbox("Fred");
      add("North",goodcheck);
      badcheck = new Checkbox();
      add("South",badcheck);
      }
      public void changelabel()
      {
      goodcheck.setLabel("Good");
      badcheck.setLabel("Bad");
      }
      }

        Attachments

          Activity

            People

            • Assignee:
              rramsunw Ranganathan Ram (Inactive)
              Reporter:
              duke J. Duke (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: