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

DND of text in JTextArea causes the disappearance of the text

    XMLWordPrintable

Details

    Description

      Hopper Build : 17
      OS tested on platforms :Sparc10(64) and Sparc10(32)
      OS build : 5.10 s10_13 sun4u sparc SUNW,Ultra-5_10

      I had tested with 5.10 s10_12 sun4u sparc SUNW,Ultra-5_10 also , and the bug is reproducible.

      Java -version:

      java version "1.4.1-rc"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-rc-b17)
      Java HotSpot(TM) Client VM (build 1.4.1-rc-b17, mixed mode)


      Test case to reproduce the bug:

      ///////////////////////////////////////////////////////////////////////

      import javax.swing.*;
      import java.awt.*;

                 public class Test extends JFrame {

                     public Test() {
                         JTextArea ta = new JTextArea();
                         ta.append("This is the text to drag.");
                         ta.append("\nThis is some other text.");
                         ta.setDragEnabled(true);
                         getContentPane().add(new JScrollPane(ta));
                     }

                     public static void main(String[] args) {
                         Test t = new Test();
                         t.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                         t.setSize(400, 400);
                         t.setVisible(true);
                     }
                 }
      ////////////////////////////////////////////////////////////////////////

      Steps to reproduce:

      1. Compile and run the above program.
      2. Highlight all of the first line.
      3. Begin a drag operation by dragging the text from the first line.
      4. Now drop somewhere the text dissapears.


      This test passed on Windows-xp and Sparc8.

      Also refer the bug 4513715.


      ###@###.### 2002-07-25

      Attachments

        Issue Links

          Activity

            People

              shickeysunw Shannon Hickey (Inactive)
              duke J. Duke
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: