JDK-4117620 : Multiple selections in TextFields and TextAreas on win32 api
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.1.5,1.2.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_95
  • CPU: x86
  • Submitted: 1998-03-06
  • Updated: 1998-11-04
  • Resolved: 1998-11-04
Related Reports
Duplicate :  
Relates :  
Description
In Java applications multiple selections are possible in TextArea and TextField
components.

0. The problem is quite easy to reproduce with the following example:

% more SelBug.java
import java.awt.*;
import java.awt.event.*;

public class SelBug extends Frame {
    public static void main(String args []) {
	Frame f = new Frame();

	TextField tf1 = new TextField(20);
	TextField tf2 = new TextField(20);
	TextArea ta = new TextArea();

        f.addWindowListener( new WindowAdapter()
          { public void windowClosing( WindowEvent e )
              { System.exit(0);
              }
          } );

	f.setLayout(new BorderLayout());
	f.add("North", tf1);
	f.add("Center", tf2);
	f.add("South", ta);
        f.setSize(300, 300);
	f.show();
    }
}

1. Compile and run example:
% javac SelBug.java
% java SelBug

2. Type in some text in upper TextField, select the text with double-clicking 
 to the text and transfer the focus out of the TextField by pressing the TAB
 key. The selection in the TextField remains.

3. Type in some text in the middle TextField, select the text with 
 double-clicking to the text and transfer the focus out of the TextField by 
 pressing the TAB key. The selection in the TextField remains, too.

4. Type in some text in the TextArea, select the text with double-clicking to 
 the text and transfer the focus out of the TextField by double-clicking to 
 one of the TextFields. 
 Now, there are 3 selections in 3 different components.

Comments
PUBLIC COMMENTS Multiple selections are possible in TextArea and TextField components.
10-06-2004

EVALUATION This appears to be a duplicate of 4091505. david.mendenhall@eng 1998-11-03 eric.hawkes@eng 1998-11-03
03-11-1998