-
Bug
-
Resolution: Fixed
-
P2
-
1.2.0, 1.3.0, 1.3.1, 1.4.0
-
rc1
-
x86, sparc
-
linux, solaris_2.6, solaris_7, solaris_8, windows_nt
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2040507 | 1.4.0 | Scott Violet | P2 | Closed | Fixed | beta2 |
JEditorPane is not fully internationalized for line wrapping.
Japanese text is displayed with wrong line breaks on JEditorPane.
See the attached snapshot i18n-false.gif.
To reproduce, the following code is compiled and executed.
If you don't have any sample HTML file, use the attached Japanese
HTML file.
% javac JEditorPaneTest.java
% java JEditorPaneTest file:<html file path>
------------------------------------------------------------------------
// JEditorPaneTest.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.text.*;
import javax.swing.event.*;
import java.io.*;
import java.util.*;
import java.net.URL;
public class JEditorPaneTest extends JFrame {
JEditorPane testEditorPane;
public JEditorPaneTest(String url) {
super(url);
try {
testEditorPane = new JEditorPane(url);
testEditorPane.setEditable(false);
} catch (Exception e) {
e.printStackTrace();
}
JScrollPane testScrollPane = new JScrollPane(testEditorPane);
testScrollPane.setVerticalScrollBarPolicy
(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
getContentPane().add(testScrollPane);
}
public static void main(String args[]) {
if (args.length != 1) {
System.out.println("Usage: java JEditorPaneTest URL");
System.exit(0);
}
JEditorPaneTest test = new JEditorPaneTest(args[0]);
WindowListener w = new WindowAdapter() {
public void windowClosing(WindowEvent e) {System.exit(0); }
};
test.addWindowListener(w);
test.setSize(300, 500);
test.setVisible(true);
}
}
-------------- End of code.
- backported by
-
JDK-2040507 JEditorPane is not fully internationalized for line wrapping.
- Closed
- relates to
-
JDK-4298479 JEditorPane needs to by sync'd with other text fixes
- Open