-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
1.4.1, 5.0
-
Fix Understood
-
generic, x86
-
generic, windows_2000
Name: jk109818 Date: 12/03/2002
FULL PRODUCT VERSION :
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
FULL OPERATING SYSTEM VERSION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
When I drag an icon, it disappear in JTextPane.
According to the code fragment below,
It shown a string and a ImageIcon on the JTextPane.
I dragged the text string which was selected, I found the
program run OK, But when I drag the icon, it(icon)
disappered.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1.Run the given code fragment.
2.Drag the icon from the head to end.
EXPECTED VERSUS ACTUAL BEHAVIOR :
The icon should be moved to the correct position.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.text.*;
import javax.swing.*;
import java.awt.*;
public class DocTest
{
public static void main(String [] args)
{
JFrame jf=new JFrame();
jf.setSize(400,300);
JPanel jp=new JPanel();
jf.setContentPane(jp);
jp.setLayout(new BorderLayout());
JTextPane jt=new JTextPane();
jt.setDragEnabled(true);
jp.add(new JScrollPane(jt));
jt.setText("Drag the icon to the end:");
jt.insertIcon(new ImageIcon("red.gif"));
jf.setVisible(true);
}
}
---------- END SOURCE ----------
(Review ID: 178512)
======================================================================
FULL PRODUCT VERSION :
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
FULL OPERATING SYSTEM VERSION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
When I drag an icon, it disappear in JTextPane.
According to the code fragment below,
It shown a string and a ImageIcon on the JTextPane.
I dragged the text string which was selected, I found the
program run OK, But when I drag the icon, it(icon)
disappered.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1.Run the given code fragment.
2.Drag the icon from the head to end.
EXPECTED VERSUS ACTUAL BEHAVIOR :
The icon should be moved to the correct position.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.text.*;
import javax.swing.*;
import java.awt.*;
public class DocTest
{
public static void main(String [] args)
{
JFrame jf=new JFrame();
jf.setSize(400,300);
JPanel jp=new JPanel();
jf.setContentPane(jp);
jp.setLayout(new BorderLayout());
JTextPane jt=new JTextPane();
jt.setDragEnabled(true);
jp.add(new JScrollPane(jt));
jt.setText("Drag the icon to the end:");
jt.insertIcon(new ImageIcon("red.gif"));
jf.setVisible(true);
}
}
---------- END SOURCE ----------
(Review ID: 178512)
======================================================================
- duplicates
-
JDK-4987557 It is unable to copy picture to clipboard in Stylepad demo
- Closed