JDK-4050369 : java.awt.List stops receiving drag events after mouse exits quickly
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.1
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt
  • CPU: x86
  • Submitted: 1997-05-07
  • Updated: 1998-05-09
  • Resolved: 1998-05-09
Related Reports
Duplicate :  
Description

Name: sgC58550			Date: 05/07/97


When the mouse is pressed and dragged inside of a java.awt.List and if the mouse is quickly dragged 
out of the List, the List will stop receiving drag events.  Run the code below and press the mouse button 
and quickly drag it out of the List.

Buck Hodges.
###@###.###


import java.awt.*;
import java.awt.event.*;

// This test demonstrates how the List doesn't continue getting drag events
// after the mouse has exited the List.  List2 below always prints the
// event when it gets a mouse motion event.  Click and drag in the List and
// then exit.  If you exit quickly (drag the mouse quickly), the List will stop
// getting the drag events.

class List2 extends List {
	public List2(int n) {
		super(n);
		enableEvents(AWTEvent.MOUSE_MOTION_EVENT_MASK);
	}
	
	public void processMouseMotionEvent(MouseEvent e) {
		System.out.println(e);
		super.processMouseMotionEvent(e);
	}
}

public class ListTest extends Frame {
	public ListTest(String s) {
		super(s);
	}
	
	public static void main(String args[]) {
		ListTest f = new ListTest("List Test");
		f.setLayout(null);
		f.show();
		f.setSize(200, 200);

		List2 l = new List2(4);
		l.addItem("fasdf");
		l.addItem("fasdf");
		l.addItem("fasdf");
		l.addItem("fasdf");
		l.addItem("fasdf");
		f.add(l);
		l.setBounds(20, 20, 100, 100);
		f.setBackground(Color.lightGray);
		f.pack();
	}
}


company - SAS Institute Inc. 
======================================================================

Comments
WORK AROUND Name: sgC58550 Date: 05/07/97 There is NONE. A fix is required so that I can extend the behavior of the java.awt.List. ======================================================================
11-06-2004

PUBLIC COMMENTS Duplicate of 4038721, not reproducible in >= 1.1.5.
10-06-2004