Details
-
Type:
Bug
-
Status: Closed
-
Priority:
P2
-
Resolution: Fixed
-
Affects Version/s: 1.2.0, 1.3.0, 1.3.1, 1.4.0
-
Fix Version/s: 1.3.1
-
Component/s: client-libs
-
Labels:
-
Subcomponent:
-
Resolved In Build:rc1
-
CPU:x86, sparc
-
OS:linux, solaris_2.6, solaris_7, solaris_8, windows_nt
-
Verification:Verified
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2040507 | 1.4.0 | Scott Violet | P2 | Closed | Fixed | beta2 |
Description
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.
Attachments
Issue Links
- 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
-