Can't display Persian text in JEditorPane

Hi
I created html pages with Persian and English text. It displays Persian characters with no problem, however when i get the local html file to display in JEditorPane the Persian chracters appear as ????
can any one help?

I installed the persian font and thats how i get the html file
ep = new JEditorPane();
          ep.setEditable(false);
          ep.setFont(new java.awt.Font("BCompaBd",java.awt.Font.PLAIN,18));
          ep.setContentType("text/rtf");
          URL url = PersianTutor.class.getResource("Copyright.html");
          try {
               ep.setPage(url);
          catch (IOException e) {
     e.printStackTrace();
     JScrollPane jp = new JScrollPane(ep);
jp.setPreferredSize(new Dimension (500, 500));
ep.addHyperlinkListener(new Link(ep));

Similar Messages

  • SuperFrench is found but this font can not display any text

    "SuperFrench" font comes from Autodesk. this fonts's real file name is supef__.ttf
    If it is placed in C:\Windows\Fonts folder then it is available for Windows native apps such as MS Excel.
    Java GraphicsEnvironment finds "SuperFrench" font
    but this font can not display any text.
    This happens in both Java6(1.6.0_34) and Java7(1.7.0_06)
    try this
    import javax.swing.*;
    import java.awt.*;
    import java.util.*;
    public class FontTest01 {
      public static void main( String[] args ){
        FontTest01 app = new FontTest01();
        app.run();
      void run() {
        String fontName = "SuperFrench"; //** SuperFrench font
        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
        String[] existFontNames = ge.getAvailableFontFamilyNames(Locale.ENGLISH);
        boolean fontExists = false;
        for( int i=0 ; i<existFontNames.length ; i++ ){
          if( existFontNames.equals( fontName ) ){
    fontExists = true; break;
    if( fontExists==false ){
    System.out.println( fontName +" does not exist" );
    System.exit(-1);
    JLabel label = new JLabel( "ABCDEFG" );
    Font font = new Font( fontName, Font.PLAIN, 20 );
    System.out.println( font.getFontName() );
    label.setFont( font );
    JFrame f = new JFrame();
    f.add( label );
    f.setSize( 180, 120 );
    f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    f.setVisible(true);
    Edited by: TadashiOhmura on 2012/06/17 23:04
    Edited by: TadashiOhmura on 2012/06/18 7:50                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Thank you for your replay.
    I face the same trouble with JavaFX
    I report this problem into Jira and filed as RT-22641
    Some members of Oracle developer team write comments for this issue.
    http://javafx-jira.kenai.com/browse/RT-22641
    This font has some irreguler structure.
    I hope Java font system will deal with it.

  • Can you display some text after you have checked a yes or no box?

    Can you display some text after you have checked a yes or no box?
    Ex:
    Yes (Please contact Bob x3-1234) only want it to appear when you check box)
    No

    Sure. If you use a field (button, text field) to display the text, the Mouse Up script of the Yes check box could be:
    getField("button1").display = event.target.value === "Yes" ? display.visible : display.hidden;
    Change "button1" to the actual name of the field and "Yes" is the export value of the Yes check box. You can use whatever you want, and you'll probably want to make the button read-only as well.

  • Can I display formated text on a TextArea

    I am developing a chat applet. I want to display texts from chatters in a TextArea with specific colour and font. But TextArea only contain a method AppendText(String) where displaying plain text is only possible. Please anyone help me to display formatted text in a TextArea(or any relavent component).
    Thank you very much.

    You will probably want to look at JEditorPane instead.

  • PDF can't display Chinese Text

    In Safari, I save the webpage as PDF. Then, in Acrobat X or Preview, I copy the text and Paste into other programe, like word ,etc,So,the Chinese text can't display.

    i have solve it. Just change the font.

  • How can i display HTML text in a TextArea

    Hello All,
    We are developing a chat application using Java Swing and RMI with MySQL as backend.
    We have two options.The users can chat thro both browser and application(Swing GUI).
    Now when a user who chats thro a browser sends a message,the chat contents are stored in HTML format in the database (like <BR><font>R u There?</Font></BR>).When the other user happens to chat thro the application,the chat contents send by the other user has to appear in the HTML format in the TextArea of the application.So obviously the textarea shud understand the HTML and display it accordingly.
    How can i do this?Kindly give me an example with some code samples if i have to use EditorPane etc 'coz i haven't got any experience using EditorPanes.
    Thanks in advance
    Regards
    Vijayakannan

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Test extends JFrame {
        public Test() {
         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         Container content = getContentPane();
         JEditorPane jep = new JEditorPane("text/html",
                  "Joe: <font color=red>R u <b>There</b>?</Font><BR>"+
                  "Mary: <font color=green>Keep ur shorts on...</Font>");
         content.add(new JScrollPane(jep), BorderLayout.CENTER);
         setSize(200,200);
         show();
        public static void main(String[] args) { new Test(); }
    }

  • How can I display the texts that the user just typed in?

    Hello all, I am  using Captivate 5.5 and I am trying to realize this function:
    Have a text entry box for the user to type in their answers (can be a paragph and up to 400 words etc.), then the user clicks on the submit button and they will be able to read what they just typed in on the left of the screen, and the sample answer given by the course.
    In order to realize this, I placed one text entry box and make the value associate to a customized variable of "log_1". Then I have two text captions:
    one named "log_1_answer" and inside of it I put $$log_1; the other one named "log_1_sample". Both text captions are set to invisible at the enter of the slide.  Then I have the advanced action for the submit button of the text entry box as "show log_1_answer; show log_1_sample; hide text_entry_log1"
    When I previewed it, I got all logistics work. However, the texts that were shown in the text caption of log_1_answer only were only 15 letters.
    I wonder whether there is a restriction for the length of variables in Captivate that we can display? If so, is there other possible ways that I can realize what I want to do?
    Thanks for any suggestions.
    Here is the screenshot of my stage: the biggest white one with the submit button is the text entry box. The box with red borders is the display box, and the blue gray one on the right is to show the samle answer by the instructor.

    Hello,
    When you insert the user variable, watch the length in the dialog box. Default is indeed 15 characters, you'll have to change that as I did in this example. Too bad, you cannot change it after inserting the variable.
    Lilybiri

  • Can I append the text in JEditorPane?

    Hi,
    I can do append text into JTextArea e.g.
    textarea.append(string);
    but in JEditorPane, it only support setText()
    setText() will replace the existing text with the new text but not appended.
    Any ideas?
    thanks.

    Document doc=jep.getDocument();
    doc.insertString(doc.getLength(), stringToInsert, null/*or whatever*/);

  • Can I display rich text in a textfield?

    I've created a form in LiveCycle Designer and there is a text field that is retrieving data from a table. The data in this field is entered from a ColdFusion form and its using the Rich Text Editor in the form. Because of this, the data that is displaying in the text field of the pdf looks like this:
    <p>This is a comment.</p>
    Is there any way for the text field to show the data with the proper formatting?  I've gone in to the field tab of the object and selected Rich Text for the Field Format but it doesn't help.

    Ok, I've added a new field which has a bind name called FieldA.
    I click on the ConditionFound field  and open the script editor. I choose calculate and enter the following:
    ConditionFound.value.exData.loadXML(FieldA.rawValue,1,1);
    I save the form.
    When I open the pdf from the link on my app, the FieldA field displays: <p>This is a test entry.</p> which it gets from the database.
    The ConditionFound field is still blank.

  • How can I display Arabic text in browser

    I have MessagesBundle_ar_AE.properties file created containing key,equivalent Arabic value text. When I try to get this key value by using Bundle object.. MissingResourceException is occuring. It says can't find resource for bundle,PropertyResourceBundle for specified key, eventhough the exists in the .properties file...
    please help..

    Be sure that .property files are in the classpath.
    http://forum.java.sun.com/thread.jsp?forum=16&thread=383005

  • N78 browser can't display bold text

    I found a problem with my N78 phone. I used the Nokia 6110 Navigator to access the webmail and it used to display the new messages in bold. However, after I changed the phone to N78, it no longer able to display the new messages in bold.
    I then write up a very simple HTML page to test the N78 built-in browser behaviour for bold text dislay and the result is negative. Both the normal text and bold text are displayed the same. Bold text are not bold when displayed in N78 browser.

    wait for firmware update
    If you find my post useful then click on
    Kudos!Nokia N96 (v20.050 / RM-247)
    www.shaysoft.net | Competitions!

  • Can i display module full name in the PIQ_AUDIT Program

    As you know we have BSP PIQ_AUDIT program can see what student have studied but only display short name of module (short name of IT1000) and can display long text when i put indicator to the short text. so users request to display long text instead of short text.
    Can i display long text instead of short text in the screen directly ?.
    if yes, how can i change it and if not can somebody recommend another way to display long text ?.
    regards,
    JD

    Hi JD,
    Under BSP PIQ_AUDIT you can view long text of module under Academic work.
    Under information --> academic work  you can view long text also.
    Hope it is clear for you.
    If not plz elaborate query .
    Regards,
    Raju

  • How to display my text file in swing

    hi all,
    i have a screen where user enters a batch no. and number.
    when user presses a button i should get a list displayed on my sreen.
    how to do this...and how to call function that generates the list in my actionlistener..please help me....

    You need to post some code in code tags. What you are asking is very easy to do yet it sounds as though you are flustered. Step back and learn each and every thing you need to do (plan) before you attempt anything in Java, trying to find out what API you need in the middle of a project is a sign of looming disaster.
    Your button needs and actionlistener and an actionPerformed method; if you have only a foggy idea what this is you need to look them up. Also, your list can be displayed in a JTextPane, JEditorPane, JTextArea, JList (?), or JTable. I suggest all these since I did not see specific requiorments posted. When dealing with any of these pay atention to the model (contains the data FOR the view object). JTextArea is the lightest of these and probably the least confusing, be sure to put it in a JScrollPane if you want to, uh, scroll the list.
    Sean

  • Crystal Report for Enterprise not displaying Long Text from BEx

    Hello,
    I am creating a report using SAP Crystal Report for Enterprise 4.0 (Version 14.0.2) and the source of data is BEx query via OLAP connection created using IDT. I am using SAP BusinessObjects BI platform 4.0.
    The Characteristic (which is hierarchy) in the Rows section of the BEx Query is set to display long text and as such, it displays long text when the query is executed in the BEx Analyzer. However, when it comes to Crystal Report, the short text is displayed in the report. Can I display long text in the Crystal Report? How?
    Thanks,
    KP

    Venkat,
    Thanks for your response. Please note, however, the transaction RAD1 does not exist. Let me provide more details about the current settings of the InfoObject.
    The Characteristic is 'Item' (0CS_ITEM) and upon going to RSA1 >  Modeling > InfoObjects > Item (0CS_ITEM) > Right Click > Display > Business Explorer (tab) > Text Type is set to 'Long Text' and BEx description is set to 'Long description' already.
    When I run/execute the query with this Item characteristic, the results in BEx Analyzer is showing appropriate long text, however, Crystal Report for Enterprise shows short text only
    K
    Edited by: Kumar Pathak on Feb 3, 2012 6:18 PM

  • Query Designer&WAD: Variable search help - Display Key/Text button

    Good day.
    Please, can you write me some solution of my problem.
    I have the character with hierarchy.
    In tab "Business Explorer" of character set display as "Text".
    When i run my query on SAP Portal and enter to search help of character, it is displays text of my ZCHARACTER(not key and text). But name of levels(0HIER_BODE) display key and text... (NODENAME and TEXT).
    When i run query in BEx Analyzer, in search help all correct. My ZCHARACTER and 0HIER_NODE displays only text.
    When i press tech button "Display Key/Text", a see marked "Text". I cannot find the same button when run search help in Query Designer, WAD(or Portal).
    How can i display only texts of 0HIER_NODE? But no [Key] Text.
    Thank you for answer.
    Regards
    Update. Can be usefull:
    View table RSDVDPA with key DPNAM='0HIER_NODE' consist field CHAPRSNT with value = '0' (Key and Text).
    When i change value of table
    UPDATE RSDDPA SET CHAPRSNT = '4'
      WHERE DPANM   EQ '0HIER_NODE'
        AND objvers EQ 'A'.
    All works correct!
    Change this value directly not correct. I think, that it is change of value of parent character. But when?

    I have created own 0HIER_NODE character - ZNODENAME.
    Only root node infoobject is 0HIER_NODE. All another - Z.
    Thanks! ^)

Maybe you are looking for

  • Can I use Insperity TimeStar on my Mac?

    Anyone familiar with Time Star Application(PC based) know how to use it on a Mac? I've loaded Internet Explorer for Mac(5.2) and it loads fine and I am able to login..however once I get to Time & Attendance the webpage is blank. I get the same "certi

  • Change GL account name

    Dear All, I want change GL account name in FS00 "Description" field, but there are transaction in this GL account already. Could you advice if there are any risk? Rdgs, Emily

  • Is it possible to use "not" logical operator in a Business Rule Condition?

    This seems like a very simple request to me, but I cannot see any other questions/answers about it. Can I add a "not" to my Conditions in a Business Rule? My scenario is that I have a core Entity with a Type.  The Type is a domain attribute with a Co

  • Convert path to line?

    I have a vector shape. I want to take one side of the shape and take those points to make a new line. Thanks

  • Converting from format AAV to MP3

    I would like to convert some of my music in my iTune library from format AAC to format MP3 and then load the new format on a memory car SD. Is it possible? and if yes, can they be stored in the iTune library and later be transferred on the memory car