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

Two clicks are required to change CheckBox attribute on Win32

XMLWordPrintable

    • 1.1fcs
    • x86
    • windows_95
    • Not verified


      masayoshi.okutsu@Eng 1997-01-13
      The following has been reported by Fujitsu.
      --
      On the AppletViewer of JDK1.1, twice clicking is necessary for
      changing CheckBox attribute by the following procedure.

            check.setLabel("select True");
            check.setState(true);

      It occurs only on Windows environment. On Solaris, only single
      clicking is necessary. And using the following procedure, only
      single clicking is necessary even on Windows environment.

            check.setState(true);
            check.setLabel("select True");


       Sample program:

        import java.awt.*;
        import java.applet.*;

        public class check extends Applet{
            Checkbox check;
            Button b1, b2;

            public void init () {
                add (check = new Checkbox("Checkbox ", false));
                add (b1 = new Button("True "));
                add (b2 = new Button("False"));

            }
            public boolean handleEvent (Event e) {
                if(e.target == b1 && e.id == Event.ACTION_EVENT) {
                    check.setLabel("select True");
                    check.setState(true);
                    check.show();
                }
                else if(e.target == b2 && e.id == Event.ACTION_EVENT) {
                    check.setLabel("select False");
                    check.setState(false);
                    check.show();
                }
                return false;
            }
        }

            tballsunw Tom Ball (Inactive)
            okutsu Masayoshi Okutsu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: