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

Multiple selections in TextFields and TextAreas on win32 api

    XMLWordPrintable

Details

    • x86
    • windows_95

    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.

      Attachments

        Issue Links

          Activity

            People

              feckssunw Fred Ecks (Inactive)
              thlenz Thomas Lenz (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: