JDK-6848320 : JEditorPane doesn't honor
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u14
  • Priority: P2
  • Status: Closed
  • Resolution: Won't Fix
  • OS: windows_vista
  • CPU: generic
  • Submitted: 2009-06-05
  • Updated: 2011-02-16
  • Resolved: 2009-06-29
Related Reports
Relates :  
Relates :  
Description
Customer is Ephox that holds a valid Java For Business contract.

If we run the following sample program on 1.6.0_14

public class JEditorPaneTest {
   
    private static String dirRTL = "<div dir='rtl'>Hello</div>";

    public static void main(String[] args) {
        JFrame frame = new JFrame("JEditorPane test");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        JEditorPane pane = new JEditorPane();
        pane.setContentType("text/html");
        pane.setText(dirRTL);
        frame.getContentPane().add(pane);
        frame.setSize(400, 200);
        frame.setVisible(true);
    }
}

Hello is aligned left in the JEditorPane. If the dirRTL string is saved in an HTML document (http://vm44.singapore.sun.com:7480/a.html) and rendered in a browser, Hello is aligned to the right.