-
Bug
-
Resolution: Duplicate
-
P4
-
6u2
-
x86
-
windows_xp
If I paste a formated text in an editable JTextPane or JEditorPane then it will insert an additional paragraph before and after the inserted line.
To reproduce:
- copy some of the text in TextPane (Ctrl-C).
- paste the text (Ctrl-V).
- observer 2 additional paragraphs above the pasted text.
---------- BEGIN SOURCE ----------
import javax.swing.*;
public class TestCopyAndPaste {
public static void main( String[] args ) {
JFrame frame = new JFrame();
JTextPane text = new JTextPane();
text.setContentType( "text/html" );
text.setText( "<p> normal Text <font color='red'>red Text</font> <b>bold text</b>" );
frame.add( text );
frame.pack();
frame.show();
}
}
---------- END SOURCE ----------
To reproduce:
- copy some of the text in TextPane (Ctrl-C).
- paste the text (Ctrl-V).
- observer 2 additional paragraphs above the pasted text.
---------- BEGIN SOURCE ----------
import javax.swing.*;
public class TestCopyAndPaste {
public static void main( String[] args ) {
JFrame frame = new JFrame();
JTextPane text = new JTextPane();
text.setContentType( "text/html" );
text.setText( "<p> normal Text <font color='red'>red Text</font> <b>bold text</b>" );
frame.add( text );
frame.pack();
frame.show();
}
}
---------- END SOURCE ----------
- duplicates
-
JDK-6723267 Newline inserted during Cut and Paste to HTMLEditorKit
-
- Closed
-