JDK-4599593 : The Drop down box springs up everytime it is dropped down in Plug-in 1.4.0 Beta3
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2001-12-12
  • Updated: 2004-02-27
  • Resolved: 2004-02-27
Related Reports
Duplicate :  
Description

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) 
======================================================================

Comments
WORK AROUND Name: gm110360 Date: 12/12/2001 None. ======================================================================
11-06-2004

EVALUATION Sounds like 4509045 which was fixed in build 87. We should check to see if this is fixed in the latest build of merlin-rc1. ###@###.### 2001-12-19
19-12-2001