Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6848320

JEditorPane doesn't honor <div dir"rtl">

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P2 P2
    • 6-pool
    • 6u14
    • client-libs
    • generic
    • windows_vista

      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.

            poonam Poonam Bajaj Parhar
            helai Herrick Lai (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: