Relates :
|
|
Relates :
|
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.