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

The Drop down box springs up everytime it is dropped down in Plug-in 1.4.0 Beta3

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.0
    • client-libs
    • x86
    • windows_2000



      Name: gm110360 Date: 12/12/2001


      java version "1.4.0 Beta 3"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0 Beta 3)
      Java HotSpot(TM) Client VM (build 1.4.0 Beta 3, mixed mode)

      STEPS TO REPRODUCE THE PROBLEM
      ==============================
      1. Use the Class Choice to create a drop down box
      2. Attach action Item to the drop down Items.
      3. Drop down the Choice box(Try for more than 2 times).
      4. The Drop down box will spring up every time it is dropped down.

      IMPORTANT NOTE: The repaint issue in 1.4.1 Beta 3 may give the illusion as
      though the Menu is dropped down. But actually it springs up every second or
      third time it is dropped down.

      SOURCE CODE:
      ============

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

      public class dropDown extends Applet
      {
      Choice fontChoice; // a drop-down list box
      Color clr;

      public void init(){
      fontChoice = new Choice();

      fontChoice.addItem ("12");
      fontChoice.addItem ("24");
      fontChoice.addItem ("36");
      fontChoice.addItem ("48");

      fontChoice.select (0);

      add (fontChoice);
      }


      public void paint (Graphics g){
      String strChoice = fontChoice.getSelectedItem();
      int nFontSize = Integer.parseInt(strChoice);
      Font f = new Font ("Arial", Font.PLAIN, nFontSize);

      g.setFont (f);
      g.drawString ("Test String", 150, 60);
      }

      public boolean action (Event e, Object obj){
      repaint();
      return true;
      }

      }

      *****************dropDown.htm******************
      <html>
      <head>



      </head>

      <body>
      <center>


       <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
              id="cim" WIDTH=350 HEIGHT=100 codebase="." name="TestThreadManager">
      <PARAM NAME=CODE VALUE="dropDown.class">
      <PARAM NAME=MAYSCRIPT VALUE=TRUE>
      <PARAM NAME=SCRIPTABLE VALUE=TRUE>
      </OBJECT>


      </center>
      </body>


      </html>
      (Review ID: 137242)
      ======================================================================

            ssisunw Ssi Ssi (Inactive)
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: