How to speep up opening html page in JEditorPane

When i call jeditorPane.setPage( URL u ) it takes about 20 seconds to show page in my JEditoPane. Could you write how to speed up loading html page. My page has 30 page. Thanks!

When i call jeditorPane.setPage( URL u ) it takes about 20 seconds to show page in my JEditoPane. Could you write how to speed up loading html page. My page has 30 page. Thanks!

Similar Messages

  • How to go to anchor html link from external html page in JEditorPane

    Hi people,
    I've been trying to jump to an anchor link from an external html page in JEditorPane, and I cannot get it working, I'm sure it can be done somehow...
    The HTML page has a link like:
    Hello
    and this is loaded into JEditorPane ok.
    The HyperlinkListener implementation:
    public void hyperlinkUpdate( HyperlinkEvent e )
    try {
    if ( e.getEventType() == HyperlinkEvent.EventType.ACTIVATED )
    editorPane_.setPage( getClass().getResource(
    MyDialog.this.getBaseURL().concat( e.getURL().getFile().substring(
    e.getURL().getFile().lastIndexOf( "/" ) + 1 ) ) ) );
    if ( e.getURL().getRef() != null )
    editorPane_.scrollToReference( e.getURL().getRef() );
    else return;
    } catch ( IOException ioe ) { ioe.printStackTrace(); }
    This code loads the new html file ok, but it does not scroll to the anchor. The MyDialog.this.getBaseURL() just returns something like com.name.package, I construct the URL by using this base url and the name of the html file to open.
    ANy help, thanks

    he! I'm not alone in my desperation. Take a look at my problem:
    I've got a JEditorPane (not editable) inside a JFrame. The JEditorPane is loaded with the HTML text and all the links to anchors are working properly when I click on them.
    BUT
    If I try to go to an anchor from outside this JFrame I can see how the JEditorPane scrolls to the right anchor and suddenly it scrolls back to the place where the caret was located!!!
    The "funny thing" is that my code is working in jdk1.3.1 but this is happening in jdk1.4.2. Is it a bug?!?!?!
    How could I figure out what position I have to set the caret to for every anchor in order to get the scroll working correctly???
    My implementation of hyperlinkUpdate (working properly, here isn't the problem):
       jEditorPane.addHyperlinkListener(new HyperlinkListener() {
          public void hyperlinkUpdate(HyperlinkEvent e) {
            if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
              MiEditorPane src = (MiEditorPane)e.getSource();
              src.goToAnchor(e.getDescription().substring(1));
        });My object jEditorPane is an instance of this class:
      class MiEditorPane extends JEditorPane {
        MiEditorPane() {
          super();
        public void goToAnchor(String anchor) {
          super.scrollToReference(anchor);
      }And this is the method I call from outside the JFrame containing the JEditorPane:
      public void goToAnchor(String anchor) {
         jEditorPane.goToAnchor(anchor);
      }Any help greatly appreciated ...

  • How can I display the HTML page from servlet which is called by an applet

    How can I display the HTML page from servlet which is called by an
    applet using the doPost method. If I print the response i can able to see the html document. How I can display it in the browser.
    I am calling my struts action class from the applet. I want to show the response in the same browser.
    Code samples will be appreciated.

    hi
    I got one way for this .
    call a javascript in showDocument() to submit the form

  • How do I customize my html page in Dreamweaver CS5 to an Avery template that I wish to print out?

    How do I customize my html page in Dreamweaver CS5 to an Avery template that I wish to print out?

    Dreamweaver and websites do not easily match up to Avery templates.  If you are trying to develop a program for customers/etc to print labels, you should look for a script to generate a PDF file to ensure the accuracy of the printing.
    If you are trying to use Dreamweaver as a substitute to print your own labels, I would highly recommend using Microsoft Word, or Adobe InDesign for a better solution.

  • Problem in Opening HTML Page in Internet Explorer from my Swing Application

    Hi,
    I am opening a HTML file in Internet Explorer from my swing application.I am using the code given below
    private final static String WIN_FLAG = "url.dll,FileProtocolHandler";
    private final static String WIN_PATH = "rundll32";
    String cmd = WIN_PATH + " " + WIN_FLAG + " " + url;
    // url is HTML file Path
    Process p = Runtime.getRuntime().exec( cmd );
    Here there are two things i need to address ...
    1)The HTML file is opening up,but it always opens behind the swing application,that makes me every time to maximize the HTML file after it being opened up.I want to open it in front of the Swing Application.I need to implement "Always On Top" functionality for the html page.
    2)Whenever i trigger action to open different HTML page,it opens in new Internet Explorer window.
    I need to open it in same IE window.
    how to solve out these problems ??? any help would be greatly appreciated .Thanks in advance.
    - Manikandan

    any idea about this ????

  • How to create dom treeof html page with java

    hi, all
    i met with a problem how to create dom tree of html page wih jave, that is, given a html page, how to create a dom tree of this page with java?
    thanks in advance.
    regards
    richard

    but i m using this code to create node in html file
    HTMLLIElement li = (HTMLLIElement)appHTML.createElement("LI");
    Text txt = appHTML.createTextNode(name);
    li.appendChild(txt);
    appHTML.getElementById("name").appendChild(li);
    this will display all name value which is coming from database,
    and i want to assign a hyperlink to it,
    I have id with name also so I thought that using id i will
    create javascript like
    function popup(id)
         if(id==1)
              var n1 = window.open("../list/name1.html");
         if(id==2)
              var n1 = window.open("../list/name2.html");
    this way i want to popup particular file if i can pass id value in this function
    so want hyperlink like
    name

  • How to create hyperlink in Html page using Java

    Hello every one
    I want to know that how can I create a hyperlink in Html page using java ?
    Let for example
    I have code like this and i want to give hyperlink to it using java.
    rember that i am creating node using this id="name" which give me multiple value. and i want to assign diff link to each name..?
    <tr>
    <td ><span id="name"></span>
    </tr>

    but i m using this code to create node in html file
    HTMLLIElement li = (HTMLLIElement)appHTML.createElement("LI");
    Text txt = appHTML.createTextNode(name);
    li.appendChild(txt);
    appHTML.getElementById("name").appendChild(li);
    this will display all name value which is coming from database,
    and i want to assign a hyperlink to it,
    I have id with name also so I thought that using id i will
    create javascript like
    function popup(id)
         if(id==1)
              var n1 = window.open("../list/name1.html");
         if(id==2)
              var n1 = window.open("../list/name2.html");
    this way i want to popup particular file if i can pass id value in this function
    so want hyperlink like
    name

  • How can I generate a html page in a servlet-applet connection?

    Hello, I have an applet which contains an ok button, when I click this button, I need that servlet generate an html page and view it in browser. How can I do this?
    Thanks

    But with this method only is possible I think open a page web, and if it is possible call url of the servlet, you generate other request and response object (other call to method doGet or doPost because ShowDocument needs parameter url), so the previously request when I click button ok it's no the same and how I obtain the prinwriter from first request, showDocument don't obtain html page from printwriter.

  • Open Html page as dialog

    Hi,
    I am trying to open a html page, which is available in my site pages using the dialog box.
    I have tried the below code, but it is not working. Page is not opening as a popup.
    lblMessage.Text += "<a class='openinwindow' href='" + clickHereUrl + "' onclick='javascript:OpenPopUpPageWithTitle('" + clickHereUrl + "',null,null,null,'Test Name')>Click Here</a>";
    I have added reference to sp.js,sp.ui.js, sp.ui.dialog.js.
    How to fix this?
    Thanks

    Check this thread, can be helpful for you
    http://social.technet.microsoft.com/Forums/en-US/a1cec8f9-260d-4514-b452-5d1cc5c2d324/sharepoint-modal-popup?forum=sharepointdevelopmentprevious
    OR
    you can also check it with below code.
    <script type="text/javascript">
    function openDialog(eid, etitle) {
    var options = {
    url: "employeedetail.aspx?IsDlg=1&eid=" + eid,
    title: etitle,
    allowMaximize: false,
    height: 500,
    width: 600,
    showClose: true
    //SP.UI.ModalDialog.showModalDialog(options);
    SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options);
    </script>
    and for calling in your anchor tag you can use below code.
    <a href="javascript:openDialog('<%= empLoyeeID("ID") %>','Employee Title"')">
    you can pass url as I am passing ID in above code.
    Adnan Amin MCT, SharePoint Architect | If you find this post useful kindly please mark it as an answer.

  • Clicking on style.css in web console opens html page

    Why does clicking on the style.css and line number automatically open an html page?
    first time using this and can't figure out why it does this or how to configure it to open with a different editor

    For launching an external editor, this extension might be handy:
    https://addons.mozilla.org/en-US/firefox/addon/dafizilla-viewsourcewith/
    Recent updates are on the "all versions" page:
    https://addons.mozilla.org/en-US/firefox/addon/dafizilla-viewsourcewith/versions/
    If you try it, please report back on how it works for you.

  • Open HTML page as a tab inside ADF Page

    Hi All,
    I have a link in my adf(jspx) page,which should actaully open a html page in a new tab.
    I am not sure how to implement this.
    I am able to open jsp fragments on new tab.But not HTML Pages.
    Can anyone help me on this.
    Thanks in Advance.

    Vikram
    Thanks for the reply.
    I want the tab to be opened inside the adf page itself as adf dynamic tab..not as a separate tab in browser.
    Sorry for not framing the question to the point.
    Opening adf fragments in a new tab inside the adf page itself is possible.
    But am able not able to specify a html page to open in a new adf tab in the same adf page.
    Thanks.

  • Open HTML page with Forms6

    Hi,
    I want to open a html page containing instructions for my application. I've tried with the Host built-in.
    While I read the instructions I cannot operate with my calling Forms-application. I want to use they in parallel.
    Can you tell me how can I solve this problem?
    Natasa

    Whoever you are -- I LOVE YOU!!!
    I have been trying to figure out a way to display PDF's without storing them as BLOBs in the database. I tried BFILE until I realized it works with a bunch of obsolete file types --not PDF's (and the files have to be stored on the oracle server).  I've used the host command in the past but it never occurred to me to use it in this situation.  Now I can just save the file name in a normal varchar2 field and then use the host command to open it up!  Brilliant! You're definitely my Valentine this year!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Open HTML page from the stage

    How can I open a HTML page by pressing a button on the stage?
    I've created a rollover button and I'm trying to make it open
    an existing html page from the local disk (not an internet URL).
    But I can't make it open with Lingo or behaviour.
    Please help.
    Thanks a lot.
    Gideon.

    goToNetPage "
    http://somewhere.html" is the
    typical form for a page on
    the web, director must use the address format the system's
    browser uses
    for local files, this is somewhat platform dependant, a
    practical
    aproach is to open the file in question from within your
    browser then
    copy and paste the displayed address into your lingo code.
    Some report the goToNetPage counterpart provided by the
    buddyAPI xtra
    works more reliably, the xtra can be used for free if limited
    to a
    couple of functions.
    An alternate approach buddyAPI can use is to have the browser
    directly
    access the html file as if it were double clicked in the file
    manager
    using the same form commonly used to open PDF files with
    acrobat.
    (sorry I don't have example code handy)

  • How to call and run HTML pages from an Applet?

    I want to run another HTML page when pressed a button in an Applet,how can i do it?

    Are you looking for this?
    applet.getAppletContext().showDocument("http://cullenwines.com.au", "_top");

  • 9i on RedHat 7.1 was successful but i can only open html pages.

    If i take a blank page (index.html) and rename it to (index.jsp) I cannot open the index.jsp. Permissions are all correct and Im not sure that the problem is. Might be a problem with Jserv but I have no idea
    THanks in advance
    Adam

    I guess i should have added that i can only open the html pages from a browser. I cannot open .jsp pages from a browser

Maybe you are looking for

  • How do I configure my Airport Extreme firewall?

    I seem to remeber configuring a firewall on my Airpot Extreme/Time Capsule when I first set it up.  How do I get into it again to check the configuration settings - The Airport Utility does seem to provide a way in.

  • Non-Stock Items -  G/L Account Error ( Error No - ME45 )

    Hi MM Experts, While creating PO for Non-stockable items I am getting oner error which says that -  " You can not enter G/L account directly for the controllling area/ Co. Code". Can u pls. help on this issue.. Thanks & Regards, Mahesh

  • Dynamic Calendar help needed

    I am trying to convert a static events calendar to dynamic and I have run into a couple of snags that I don't seem to be able to figure out (darned Newbies!) The big problem that I am having is to have the Month/Year header display only one time for

  • Currency Format in chart

    Hi, I have displayed bar chart in pdf. The chart is currently displaying chart data like 1,757.25. I want to change it to dutch format like 1.757,25 and also a euro symbol should be added as a prefix. Can this be done by modifying the alt text of the

  • TS1702 I accidently deleted my IPod app, how can I get it back on my IPad?

    How can I get the Icon back?