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

Drag&Drop state indicator indicates wrong state

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 1.4.1
    • client-libs
    • x86
    • linux



      Name: dk106046 Date: 07/17/2002

      Linux RedHat7.2 and 7.3 with Gnome desktop

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

      1. javac JTextAreaDnD.java, and testClass.java
      2. java testClass
      3. Select "Drag Source" string with mouse and press left mouse button
         on selected text and keep it
      4. State indicator is changed to droppable with move
      5. Move mouse cursor to GNOME Desktop, state indicator is changed to not-droppable
      6. Move mouse cursor to the other JTextArea("Drop Target")
      7. State indicator should be droppable with move,
         But it's not-droppable with move <== PROBLEM
      8. Press Shift or Ctrl key, state indicator is changed to droppable with move/copy

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

      public class testClass {

          public static void main(String[] args) {

             JFrame frames = new JFrame("JTextArea - Drag Source");

             frames.getContentPane().add(new JTextAreaDnD());

             frames.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

             frames.setSize(200, 100);

             frames.setLocation(10,10);

             frames.show();
             
             Frame framet = new JFrame("JTextArea - Drag Target");

             framet.getContentPane().add(new JTextAreaDnD());

             framet.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

             framet.setSize(200,100);

             framet.setLocation(250,10);

             framet.show();

          }

      }


      and

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

      public class JTextAreaDnD extends JTextArea {
          public JTextAreaDnD() {
              super("Draggable Text");
              setDragEnabled(true);
          }
      }


      ======================================================================

            agerasimsunw Alexander Gerasimov (Inactive)
            dkorbel David Korbel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: