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

Mouse Console freezes when clicking MB1 or MB3 repeatedly.

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.1.8
    • CPU:
      sparc
    • OS:
      solaris_2.5
    • Verification:
      Verified

      Description


      chosho.kyo@japan 1998-10-16

      The following is the testcase of this bug.

      [Working Evironment]
      OS: Solaris 2.5.1J, Solaris2.6J
      JRE: jre1.1.6FCS
      Window: CDE1.0.2

      [Phenomenon]
       Mouse Console freezes when clicking MB1 or MB3 repeatedly.

      [Step1] Compile S013.java, run S013.class
      [Step2] A frame "S013-Sample" with a Choice "Choiceitem" appears.
      [Step3] Click MB1 or MB3 on "Choiceitem" repeatedly.
      [Step4] At some moment, mouse console will get frozen.
              But if the Esc-key is pushed, the mouse console will be defrosted.

      //-----------Start S013.java -----------------------------
      import java.awt.*;
      import java.awt.event.*;

      public class S013 extends Frame implements ActionListener,ItemListener{

              public Choice wsChoice;
              public CGUMainArea mainPanel;
              public Label wsLabel;
              public GridBagLayout mainLayout;

              public S013(){

                      mainPanel = new CGUMainArea();
                      mainLayout = new GridBagLayout();

                      mainPanel.setSize(320,290);
                      mainPanel.setLayout(mainLayout);
                      this.add(mainPanel);

                      wsLabel = new Label("Label: ");

                      wsChoice = new Choice();
                      wsChoice.addItem("ChoiceItem1");
                      wsChoice.addItem("ChoiceItem2");
                      wsChoice.addItem("ChoiceItem3");
                      wsChoice.addItemListener(this);
                      mainPanel.add(wsLabel);
                      mainPanel.add(wsChoice);
                      add(mainPanel);
                      super.setSize(200,100);
                      setTitle("S013-Sample");
                      setVisible(true);
              }

              public void actionPerformed(ActionEvent e){
              }
              public void itemStateChanged(ItemEvent e){
                      System.out.println("item State Changed");
              }
              static public void main(String str[]){
                      new S013();
              }
      }

      class CGUMainArea extends Panel{

          private ScrollPane pane;
          private int width;
          private int height;

          public CGUMainArea(){

              pane = new ScrollPane(ScrollPane.SCROLLBARS_AS_NEEDED);

              pane.add(this);
          }

          public void setSize(int width,int height){

              this.width = width;
              this.height = height;
              super.setSize(this.width,this.height);
          }

          public void paint(Graphics g){

              super.setSize(width,height);
          }

          public ScrollPane getScrollPane(){

              return pane;
          }

          public String toString(){

              String str = null;

              str = "[";
              str += ",pane = " + pane;
              str += ",width = " + width;
              str += ",height = " + height + "]";
              return str;
          }
      }

      //-----------End S013.java -----------------------------

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              xdengsunw Xianfa Deng (Inactive)
              Reporter:
              duke J. Duke (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: